export type Handler = (parameters: DecoratorParameters) => Promise; export type Method = (this: T, ...args: any[]) => Promise; export type Decorator = (target: U, key: keyof U, descriptor: TypedPropertyDescriptor>) => TypedPropertyDescriptor>; export interface DecoratorParameters { /** * Current call arguments. */ args: U; /** * A callback to call the decorated method with the current arguments. */ callback(): unknown; /** * Current call context. */ instance: T; /** * The decorated method name. */ methodName?: string; } /** * Applies decorating function to intercept decorated method calls. * @param fn - The decorating function. */ export declare function decorate(fn: Handler): Decorator;