type EmptyFn = () => V; type PresentFn = (value: P) => V; export declare abstract class Optional { readonly value?: T | undefined; protected constructor(value?: T | undefined); abstract isPresent(): boolean; abstract isEmpty(): boolean; abstract get(): T; present(callback: (value: T) => V): Undefined; empty(callback: () => V): Undefined; when(present: PresentFn, empty: EmptyFn): V; static build(value?: Nulleable): Optional; static of(value: T): Optional; static empty(): Optional; } export {};