import { EitherInterface } from './interfaces/either.interface'; import { Left } from './left'; import { Right } from './right'; /** * Logical disjunction between `Right` and `Left`. * @class Either */ export declare abstract class Either { /** * Construct an Either from a nullable type. * @param {T} x * @returns {EitherInterface} */ static fromNullable(x: T): EitherInterface; /** * Construct an Either from a synchronous computation that may throw errors. * @param {() => T} f * @returns {EitherInterface} */ static try(f: () => T): EitherInterface; /** * Create a Right. * @param {T} x * @returns {Right} */ static of(x: T): Right; /** * Create a left. * @param {T} x * @returns {Left} */ static left(x: T): Left; }