• Executes all Promises in serial order and returns either all results or throws the first error.

    The results will be returned in an Array with the same order as the executed Promises.

    Example

    Execute all Promises in serial

    const promise = allSerial([
    Promise.resolve(1),
    Promise.resolve(2)
    ]);

    promise.then(v => console.log(v)); // [1, 2]

    Returns

    a Promise that executes all Promises in serial

    Type Parameters

    • T

    Parameters

    • promises: Iterable<Promise<T>>

      the Promises to execute in serial order

    • values: T[] = []

    Returns Promise<T[]>

Generated using TypeDoc