• Wait to finish of all given promises. This method does not fail fast like Promise.all, it will wait until all promises are executed.

    Note that the standard Promise.allSettled function may be a superior alternative.

    Type Parameters

    • T

    Parameters

    • promises: (T | PromiseLike<T>)[]

      the promises to wait for.

    Returns CancelablePromise<T[]>

    to wait for all promises to finish.

    Example

    import join from "apprt-core/join";
    let a = fetch("test.json");
    let b = fetch("test2.json");
    join([a,b]).then(results => {
    let ajson = results[0];
    let bjson = results[1];
    ...
    }, e => {
    // e.error => first of all errors
    // e.all => results, e.g. e.all[0] === result of ajson
    ));

Generated using TypeDoc