interface Ok<T> {
    ok: true;
    value: T;
}
interface Err {
    ok: false;
    error: Error;
}
type Res<T> = Ok<T> | Err;
export declare class Result<T> {
    private res;
    static ok<T>(value: T): Result<T>;
    static err(): Result<never>;
    static err(error: Error): Result<never>;
    static err(message: string): Result<never>;
    private static wrapCallback;
    private static wrapPromise;
    static wrap<T>(callback: () => T): Result<T>;
    static wrap<T>(promise: Promise<T>): Promise<Result<T>>;
    private constructor();
    transform<U>(fn: (value: T) => U): Result<U>;
    unwrap(): Res<T>;
    unwrap<U>(fallback: U): Res<T | U>;
    value(): T | undefined;
    value<U>(fallback: U): T | U;
    error(): Error | undefined;
}
export {};
