import { Collection } from './collection.js';
import { Either } from './either.js';
import { ArrayIterable } from './array-iterable.js';
import { HashSet } from './hashset.js';
import { HashMap } from './hashmap.js';
import { Mappable } from './mappable.js';
export interface OptionMatch {
some: (value: A) => T;
none: () => T;
}
export declare abstract class Option extends ArrayIterable> implements Mappable {
abstract readonly get: A;
static when(cond: boolean): (a: () => A) => Option;
static useless(cond: boolean): (a: () => A) => Option;
protected fromArray(array: A[]): Option;
exists(p: (value: A) => boolean): boolean;
filter(p: (value: A) => boolean): Option;
filterNot(p: (value: A) => boolean): Option;
map(f: (item: A) => B): Option;
flatMap(p: (value: A) => Option): Option;
mapPromise(f: (v: A) => Promise): Promise