Type Alias Timeout

Timeout: HasCompletion & {
    cancel(): void;
    start(altTimeoutMs?: number, args?: readonly unknown[]): void;
}

A resettable timeout, returned by timeout

Type declaration

  • cancel:function
    • Cancels the timer, aborting any scheduled execution.

      Returns void

  • start:function
    • Starts the timer. If the timer has already been started and has a scheduled execution, this is cancelled and re-scheduled.

      Parameters

      • OptionalaltTimeoutMs: number

        Optional override for the interval. Use undefined to use the original interval

      • Optionalargs: readonly unknown[]

      Returns void