• Returns a promise that is fulfilled with undefined after a timeout elapses.

    Parameters

    • ms: number

      The timeout in milliseconds after which the returned promise is fulfilled.

    Returns AbortablePromise<void>

    The promise that is fulfilled after a timeout.

  • Returns a promise that is fulfilled with a value after a timeout elapses.

    Type Parameters

    • T

      The value to fulfill the promise with.

    Parameters

    • ms: number

      The timeout in milliseconds after which the returned promise is fulfilled.

    • value: Awaitable<T>

      The value to fulfill the promise with.

    Returns AbortablePromise<T>

    The promise that is fulfilled with the value after the timeout elapses.