• Evaluate the Either in a string-keyed record or object literal and collect the Right values in an equivalent structure.

    Type Parameters

    • TProps extends Record<string, Either<any, any>>

    Parameters

    • props: TProps

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

    Remarks

    This function turns a string-keyed record or object literal of Either "inside out". For example:

    • Record<string, Either<E, T>> becomes Either<E, Record<string, T>>
    • { x: Either<E, T1>, y: Either<E, T2> } becomes Either<E, { x: T1, y: T2 }>

Generated using TypeDoc