Function all

  • Executes passed in Promises/async calls in parallel, collecting results into the output array.

    Example

    const vals = await sm.util.all(
    sm.util.sleep(100),
    (async () => {
    await sm.util.sleep(100)
    return 8
    })()
    )
    expect(vals[1]).toBe(8)

    Type Parameters

    • T extends any[]

    Parameters

    • Rest ...args: Promise<T[number]>[]

    Returns Promise<Awaited<T>[]>

Generated using TypeDoc