export declare type Result = Valid | Err; export declare const valid: (value: T) => Valid; export declare const err: (error: E) => Err; export declare class Valid { readonly value: T; constructor(value: T); isValid(): this is Valid; isError(): this is Err; getValue(): T; getError(): E; map(func: (t: T) => A): Result; mapErr(func: (e: E) => U): Result; } export declare class Err { readonly error: E; constructor(error: E); isError(): this is Err; isValid(): this is Valid; getValue(): T; getError(): E; map(func: (t: T) => A): Result; mapErr(func: (e: E) => U): Result; }