export declare enum TraceMethodType {
    ClassGetter = 0,
    ClassSetter = 1,
    ClassMethod = 2,
    Function = 3
}
export declare class TraceMethod {
    className: string;
    methodName: string;
    methodType: TraceMethodType;
    source: string;
    calls: number;
    inclusiveTime: number;
    innerTime: number;
    methodsCalled: TraceMethod[];
    constructor(className: string, methodName: string, methodType: TraceMethodType);
}
export declare class TraceCall {
    method: TraceMethod;
    async: TraceAsync;
    args: any[];
    ret: any;
    callIndex: number;
    isAsync: boolean;
    isAwait: boolean;
    completed: boolean;
    startTime: number;
    endTime: number;
    error: Error | undefined;
    stack: string;
    level: number;
    constructor(async: TraceAsync, method: TraceMethod, args: any[], isAsync: boolean, isAwait: boolean);
    get systemTime(): number;
    get traceTime(): number;
    start(): void;
    complete(ret: any): void;
    completeException(error: Error): void;
    get argsToString(): string;
    stringifyObject(obj: any): string;
    verbose(obj: any, verbose?: boolean, maxlength?: number): string;
    toString(showIndent?: boolean, showSource?: boolean, showTiming?: boolean, showVerbose?: boolean): string;
    toShortString(showVerbose?: boolean): string;
}
export declare class TraceAsync {
    id: number;
    eid: number;
    tid: number;
    stack: TraceCall[];
    trace: TraceCall[];
    constructor(id: number);
}
export declare class TraceManager {
    static enabled: boolean;
    displayRuntimeTrace: boolean;
    displayStateOnException: boolean;
    onException: (error: Error) => void;
    private methods;
    private asyncs;
    private nextAsyncId;
    static async_promise_map: Map<number, number>;
    constructor();
    createMethod(className: string, methodName: string, methodType: TraceMethodType): TraceMethod;
    createAsync(await: boolean): TraceAsync;
    start(className: string, methodName: string, args: any[], methodType: TraceMethodType, isAsync: boolean, isAwait: boolean): TraceCall | undefined;
    complete(trace: TraceCall | undefined, ret: any): void;
    getAsync(id: number): TraceAsync | undefined;
    completeError(trace: TraceCall | undefined, error: Error): void;
    showException(error: any): void;
    showState(stack?: any): void;
    showStack(): void;
    showTrace(indent?: boolean, source?: boolean, timing?: boolean, verbose?: boolean): void;
    showMethods(indent?: boolean, source?: boolean, timing?: boolean): void;
    get main(): TraceAsync | undefined;
    clearTrace(): void;
    get firstTrace(): string;
    get lastTrace(): string;
}
export declare const traceManager: TraceManager;
export declare function isPromise(p: any): boolean;
export declare function RegisterTraceGetter(target: any, name?: string, descriptor?: any): any;
export declare function RegisterTraceSetter(target: any, name?: string, descriptor?: any): any;
export declare function RegisterTraceClass(targetClass: any): any;
export declare function traceFunction(funct: any, ...args: any[]): any;
export declare function round(x: number, decimal?: number): number;
//# sourceMappingURL=trace.d.ts.map