Skip to content

TimeoutContext

Context provided to the timeout handler.

Import:

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

Signature:

export interface TimeoutContext

Properties

PropertyTypeDescription
durationnumberThe duration in milliseconds since the operation started.
onOperationCompleted(callback: () => void) => voidRegisters a callback to be invoked when the operation completes.
operationNamestringThe name of the operation.
terminateOperation() => voidTerminates the operation that timed out.

Links to this page: