• Constructs an EitherAsync object from a function that takes an object full of helpers that let you lift things into the EitherAsync context and returns a Promise

    Type Parameters

    • L
    • R

    Parameters

    • runPromise: (helpers: EitherAsyncHelpers<L>) => PromiseLike<R>

    Returns functional.EitherAsync<L, R>

Methods

  • Takes a list of EitherAsyncs and returns a Promise that will resolve with all Left values. Internally it uses Promise.all to wait for all results

    Type Parameters

    • L
    • R

    Parameters

    Returns Promise<L[]>

  • Takes a list of EitherAsyncs and returns a Promise that will resolve with all Right values. Internally it uses Promise.all to wait for all results

    Type Parameters

    • L
    • R

    Parameters

    Returns Promise<R[]>

  • Turns a list of EitherAsyncs into an EitherAsync of list. The returned Promise will be rejected as soon as a single EitherAsync resolves to a Left, it will not wait for all Promises to resolve and since EitherAsync is lazy, unlike Promise, the remaining async operations will not be executed at all

    Type Parameters

    • L
    • R

    Parameters

    Returns functional.EitherAsync<L, R[]>