Function PromiseRace

  • Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.

    Returns

    A new Promise.

    Type Parameters

    • T

    Parameters

    • values: Iterable<T | PromiseLike<T>>

      An iterable of Promises.

    Returns Promise<Awaited<T>>

  • Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.

    Returns

    A new Promise.

    Type Parameters

    • T extends [] | readonly unknown[]

    Parameters

    • values: T

      An array of Promises.

    Returns Promise<Awaited<T[number]>>

Generated using TypeDoc