feat(core-shared/instrumentation): withCapture attaches runtime __captured marker
This commit is contained in:
@@ -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>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user