import * as t from 'io-ts'; import { Maybe } from './Maybe'; import { Serialisable } from './Serialisable'; export declare type URI = 'Result'; export declare class Result { private readonly value; static ok: (value: A_1) => Result; static error: (error: E_1) => Result; static fromMaybe: (e: E_1, ma: Maybe) => Result; static fromPredicate: (fallback: E_1, p: (a: A_1) => boolean) => (a: A_1) => Result; private constructor(); uri: URI; fold: (onError: (e: E) => B, onOk: (a: A) => B) => B; getOk: () => Maybe; getOrElse: (a: A) => A; getOrElseBy: (a: (e: E) => A) => A; getError: () => Maybe; getErrorOrElse: (e: E) => E; getErrorOrElseBy: (e: (a: A) => E) => E; isError: boolean; isOk: boolean; flip: () => Result; map: (f: (a: A) => B) => Result; mapError: (f: (e: E) => F) => Result; flatMap: (f: (a: A) => Result) => Result; catchError: (f: (e: E) => Result) => Result; } declare type t = { tag: 'Error'; error: E; } | { tag: 'Ok'; value: A; }; export declare type SerialiseableResult = Serialisable>; export declare const serialisableResultC: (e: t.Type, a: t.Type) => t.Type>, Serialisable<"Result", t>, unknown>; export {};