• Evaluate the Either in an array or a tuple literal and collect the Right values in an equivalent structure.

    Type Parameters

    • TEithers extends [] | readonly Either<any, any>[]

    Parameters

    • eithers: TEithers

    Returns Either<Either.LeftT<TEithers[number]>, {
        -readonly [K in keyof TEithers]: Either.RightT<TEithers[K]>
    }>

    Remarks

    This function turns an array or a tuple literal of Either "inside out". For example:

    • Either<E, T>[] becomes Either<E, T[]>
    • [Either<E, T1>, Either<E, T2>] becomes Either<E, [T1, T2]>
  • Evaluate the Either in an iterable and collect the Right values in an array.

    Type Parameters

    • E

    • T

    Parameters

    • eithers: Iterable<Either<E, T>>

    Returns Either<E, T[]>

    Remarks

    This function turns an iterable of Either "inside out". For example, Iterable<Either<E, T>> becomes Either<E, T[]>.

Generated using TypeDoc