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

    Type Parameters

    • T

    Parameters

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

      An iterable of Promises.

    Returns Promise<Awaited<T>>

    A new Promise.

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

    Type Parameters

    • T extends [] | readonly unknown[]

    Parameters

    • values: T

      An array of Promises.

    Returns Promise<Awaited<T[number]>>

    A new Promise.