Setu-TS
    Preparing search index...

    Interface DeadlineOptions

    Options for withDeadline.

    0.9.0

    interface DeadlineOptions {
        onTimeout: () => Error;
        timeoutMs: number;
        timing?: Pick<ProbeTiming, "setTimer" | "clearTimer">;
    }
    Index
    onTimeout: () => Error

    Builds the error the returned promise rejects with when the deadline fires. Called at most once, and only on expiry. If it throws, the thrown value is used as the expiry error instead — the signal is still aborted and the promise still rejects.

    timeoutMs: number

    How long the call may run, in milliseconds. 0 means unbounded: no timer is armed and the call's own outcome is returned unchanged.

    Must be a finite number in 0–2147483647 (the runtime timer range).

    timing?: Pick<ProbeTiming, "setTimer" | "clearTimer">

    Timer surface the deadline runs on — typically resolveProbeTiming(ctx.runtime). Only setTimer/clearTimer are read.

    the ambient setTimeout/clearTimeout, for a caller with no runtime to hand (the createCachedProbe default)