export type Either = Left | Right; export declare class Left { readonly value: L; constructor(value: L); map(f: (a: A) => B): Either; bimap(g: (a: A) => B, f: (l: L) => V): Either; fold(whenRight: (a: A) => B, whenLeft: (l: L) => B): B; bifold(whenRight: (a: A) => B, whenLeft: (l: L) => V): V | B; getOrElse(a: A): A; isLeft(): this is Left; isRight(): this is Right; swap(): Either; filterOrElse(p: (a: A) => boolean, zero: L): Either; match(whenRight: (value: A) => void, whenLeft: (value: L) => void): void; } export declare class Right { readonly value: A; constructor(value: A); map(f: (a: A) => B): Either; bimap(g: (a: A) => B, f: (l: L) => V): Either; fold(whenRight: (a: A) => B, whenLeft: (l: L) => B): B; bifold(whenRight: (a: A) => B, whenLeft: (l: L) => V): V | B; getOrElse(a: A): A; isLeft(): this is Left; isRight(): this is Right; swap(): Either; filterOrElse(p: (a: A) => boolean, zero: L): Either; match(whenRight: (value: A) => void, whenLeft: (value: L) => void): void; } export declare const left: (l: L) => Either; export declare const right: (a: A) => Either;