Type alias IEither<L, R>

IEither<L, R>: Either<L, R> & {
    bind: (<B>(f: ((a: R) => Either<L, B> | B)) => IEither<L, B>);
    isLeft: (() => null | IEither<L, R>);
    isRight: (() => null | IEither<L, R>);
    map: (<B>(f: ((a: R) => B)) => IEither<L, B>);
    unleft: (() => IOption<L>);
    unleftOr: ((or: either.OrHandler<R, L>) => L);
    unright: (() => IOption<R>);
    unrightOr: ((or: either.OrHandler<L, R>) => R);
    unwrap: (() => R);
    unwrapLeft: (() => L);
}

Interface over either to call either methods directly on Either objects that implements it.

Type Parameters

  • L

    the left value type

  • R

    the right value type

Generated using TypeDoc