feat(core-shared/instrumentation): withCapture attaches runtime __captured marker

This commit is contained in:
2026-05-12 22:40:44 +02:00
parent 9e21baf5fb
commit 77fddcde78
2 changed files with 13 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import type { ILogger } from "./logger.interface";
import type { Captured } from "../conformance/brands";
import { attachBrand } from "../conformance/brand-runtime";
import { isReported, markReported } from "./reported-flag";
/**
@@ -38,5 +39,6 @@ export function withCapture<Args extends unknown[], R>(
throw err;
}
};
attachBrand(wrapped, "__captured");
return wrapped as Captured<(...args: Args) => Promise<R>>;
}