Skip to content

RunWithTimeoutParams<Result>

Options for runWithTimeout.

Import:

import type { RunWithTimeoutParams } from '@mnaoumov/typescript-lib/async';

Signature:

export interface RunWithTimeoutParams<Result>

Properties

PropertyTypeDescription
context?unknownThe context of the function.
onTimeout?(context: TimeoutContext) => voidThe function to handle the timeout.
operationFunction(abortSignal: AbortSignal) => Promisable<Result>The operation function to execute.
operationName?stringThe name of the operation.
stackTrace?string | undefinedThe stack trace of the source function.
timeoutInMillisecondsnumberThe maximum time to wait in milliseconds.

Links to this page: