TS-Scribe - v1.2.0
    Preparing search index...

    Type Alias TraceCallInfo<Args, Return>

    Information recorded for a single invocation of a traced function. Passed to TraceOptions.onCall after each call settles.

    type TraceCallInfo<Args extends unknown[], Return> = {
        args: Args;
        callIndex: number;
        durationMs: number;
        error: unknown;
        result: Awaited<Return> | undefined;
        threw: boolean;
    }

    Type Parameters

    • Args extends unknown[]
    • Return
    Index

    Properties

    args: Args

    Arguments passed to this invocation.

    callIndex: number

    Zero-based index reflecting invocation order, not settlement order. For concurrent async calls, entries in TracedFunction.calls may be appended in settlement order — use callIndex to restore invocation order. Not reset when TracedFunction.clear is called.

    durationMs: number

    Wall time in milliseconds from invocation to settlement. For async functions this covers the full await time.

    error: unknown

    Error thrown or rejection reason. undefined when TraceCallInfo.threw is false.

    result: Awaited<Return> | undefined

    Value returned (or resolved) by this invocation. undefined when TraceCallInfo.threw is true.

    threw: boolean

    true if this invocation threw synchronously or the returned Promise rejected.