@caidrive/shared
Version:
caidrive.shared.components
57 lines (56 loc) • 836 B
TypeScript
/**
* What it does.
*
* @param name - Parameter description.
* @returns Type and description of the returned object.
*
* @example
* ```
* Write me later.
* ```
*/
export type Either<L, R> = Left<L, R> | Right<L, R>;
/**
*
*/
export declare class Left<L, R> {
readonly value: L;
/**
*
*/
constructor(value: L);
/**
*
*/
isLeft(): this is Left<L, R>;
/**
*
*/
isRight(): this is Right<L, R>;
}
/**
*
*/
export declare class Right<L, R> {
readonly value: R;
/**
*
*/
constructor(value: R);
/**
*
*/
isLeft(): this is Left<L, R>;
/**
*
*/
isRight(): this is Right<L, R>;
}
/**
*
*/
export declare const left: <L, R>(l: L) => Either<L, R>;
/**
*
*/
export declare const right: <L, R>(r: R) => Either<L, R>;