declare class OkResult<T> {
    private readonly contents;
    constructor(contents: T);
    isOk(): this is OkResult<T>;
    isErr(): false;
    mapOk<R>(mapper: (t: T) => R): OkResult<R>;
    mapErr(): OkResult<T>;
    unwrap(): T;
    unwrapOrThrow(): T;
    orElse(): T;
}
declare class ErrResult<U> {
    private readonly contents;
    constructor(contents: U);
    isOk(): this is OkResult<never>;
    isErr(): this is ErrResult<U>;
    mapOk(): ErrResult<U>;
    mapErr<R>(mapper: (u: U) => R): ErrResult<R>;
    unwrapErr(): U;
    unwrapOrThrow(errToThrow: Error): never;
    orElse<T>(t: T): T;
}
export type Result<T, U> = OkResult<T> | ErrResult<U>;
export declare function resultOf<T, U>(value: T): Result<T, U>;
export declare function resultOfErr<T, U>(value: U): Result<T, U>;
export declare function isOk<T, U>(result: Result<T, U>): result is OkResult<T>;
export {};
