Function withTimeoutRejection

  • Returns a promise that resolves after the specified time interval and throws an error if the specified promise does not resolve before the timeout interval.

    Type Parameters

    • T

    Parameters

    • promise: Promise<T>

      The promise to be resolved.

    • timeoutMs: number

      The time interval in milliseconds.

    Returns Promise<T>

    A promise that resolves after the specified time interval.

    Throws

    if the specified promise does not resolve before the timeout interval.

Generated using TypeDoc