UNPKG

@magna_shogun/catch-decorator

Version:

Handle exceptions by just annotating a method or class with a decorator. Based on enkot/catch-decorator.

5 lines (4 loc) 225 B
declare type HandlerFunction = (error: Error, ctx: any) => void; export declare const Catch: (errorType: any, handler: HandlerFunction) => any; export declare const CatchAll: (handler: HandlerFunction) => any; export {};