import { Result } from "./result"; export interface OptionArms { Some(value: T): A; None(): A; } export declare class Option { #private; private constructor(); static None(): Option; static Some(value: T): Option; static from(value: T | null | undefined): Option; match(option: OptionArms): A; unwrap(): T; unwrapOr(value: T): T; unwrapOrElse(f: () => T): T; expect(message: string): T; inspect(f: (value: T) => any): Option; insert(value: T): T; getOrInsert(value: T): T; getOrInsertWith(f: () => T): T; isNone(): boolean; isSome(): boolean; isSomeAnd(f: (value: T) => boolean): boolean; intoResult(error: E): Result; map(predicate: (value: T) => F): Option; mapOr(value: V, f: (value: T) => V): V; mapOrElse(defaultF: () => V, f: (value: T) => V): V; filter(predicate: (value: T) => boolean): Option; flatten(): Option; take(): Option; takeIf(predicate: (value: T) => boolean): Option; replace(value: T): Option; zip(other: Option): Option<[T, U]>; zipWith(other: Option, f: (self: T, other: O) => R): Option; unzip(): [Option, Option]; transpose(): Result, E>; okOr(err: E): Result; okOrElse(err: () => E): Result; and(option: Option): Option; andThen(f: (value: T) => Option): Option; or(option: Option): Option; orElse(f: () => Option): Option; xor(option: Option): Option; [Symbol.iterator](): Generator; iter(): (T | undefined)[]; } export declare const None: typeof Option.None; export declare const Some: typeof Option.Some;