execution-time-tracker-decorator
Version:
Easily track and log execution time of your methods in Node and Browser apps
8 lines (7 loc) • 568 B
TypeScript
export declare function ExecTimeSync(params?: ExecutionTimeDecoratorParameters): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => void | TypedPropertyDescriptor<() => void>;
export declare function ExecTimeAsync(params?: ExecutionTimeDecoratorParameters): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => void | TypedPropertyDescriptor<() => Promise<void>>;
export type ExecutionTimeDecoratorParameters = {
title?: string;
shouldLogArguments?: boolean;
loggerMethod?: (msg: string, params: any) => any;
};