alias for Array.fromAsync.

  • Creates an array from an async iterator or iterable object.

    Type Parameters

    • T

    Parameters

    • iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>

      An async iterator or array-like object to convert to an array.

    Returns Promise<T[]>

  • Creates an array from an async iterator or iterable object.

    Type Parameters

    • T
    • U

    Parameters

    • iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>

      An async iterator or array-like object to convert to an array.

    • mapFn: (value: Awaited<T>, index: number) => U
    • OptionalthisArg: any

      Value of 'this' used when executing mapfn.

    Returns Promise<Awaited<U>[]>