@snap/camera-kit
Version:
Camera Kit Web
10 lines • 646 B
TypeScript
import type { Logger } from "./logger";
/**
* Creates a class member decorator that logs errors thrown during the member invocation.
* If the member returns a Promise, promise rejections are handled.
* Any caught errors are re-thrown.
* @param logger The logger to report errors to.
* @return A decorator function.
*/
export declare function errorLoggingDecorator<This, Args extends any[], Return>(logger: Logger): (target: (this: This, ...args: Args) => Return, _context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>) => (this: This, ...args: Args) => Return;
//# sourceMappingURL=errorLoggingDecorator.d.ts.map