export declare type AnyFunction = (...args: any[]) => any | Promise; export declare type Decorator = (fn: T, name?: string) => T; interface DecoratorOptions { onCalled?(params: Parameters, fnName: string): void; onReturned?(result: ReturnType, params: Parameters, fnName: string): void; onError?(error: any, params: Parameters, fnName: string): void; fnName?: string; self?: any; } /** 创建一个函数装饰器 */ export declare function createDecorator({ onCalled, onReturned, onError, self, }: DecoratorOptions): Decorator; export {};