UNPKG

ts-cast

Version:
6 lines (5 loc) 221 B
export type Left<E> = [undefined, E]; export type Right<T> = [T]; export type Either<E, T> = Left<E> | Right<T>; export declare const Left: <E>(error: E) => Left<E>; export declare const Right: <T>(value: T) => Right<T>;