declare enum tag { 'right' = "right", 'left' = "left" } export interface ILeft { value: A; tag: tag.left; } export interface IRight { value: B; tag: tag.right; } export declare type Either = ILeft | IRight; export declare type Maybe = Either; export declare const Left: (val: A) => ILeft; export declare const Right: (val: B) => IRight; export declare const isLeft: (val: Either) => val is ILeft; export declare const isRight: (val: Either) => val is IRight; export declare const either: (leftFn: (left: L) => A, rightFn: (right: R) => B, value: Either) => A | B; export declare const whenRight: (resolve: (value: R) => T | Promise) => (value: Either | Promise>) => Promise>; export declare const tryCatch: (fn: () => Promise) => Promise>; export {};