export declare class Option<T> {
    private value;
    constructor(value: T | null);
    get isSome(): boolean;
    map<U>(func: (from: T) => U): Option<U>;
    flatMap<U>(func: (from: T) => Option<U>): Option<U>;
    orElse(defaultValue: T): T;
    toNullable(): T | null;
    match<U>(whenSome: U, whenNone: U): U;
}
export declare const none: Option<any>;
export declare function some<T>(value: T): Option<T>;
export declare function fromNullable<T>(value: T | undefined | null): Option<T>;
export declare function fromTry<T>(value: () => T): Option<T>;
