import type { AsyncMonad, Alternative, Container, Catamorphism } from "@sweet-monads/interfaces"; declare const enum MaybeState { Just = "Just", None = "None" } export default class MaybeConstructor implements AsyncMonad, Alternative, Container, Catamorphism<[void, T]> { private readonly type; readonly value: S extends MaybeState.Just ? T : undefined; static chain(f: (v: A) => Promise>): (m: Maybe) => Promise>; static merge(values: [Maybe]): Maybe<[V1]>; static merge(values: [Maybe, Maybe]): Maybe<[V1, V2]>; static merge(values: [Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3]>; static merge(values: [Maybe, Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3, V4]>; static merge(values: [Maybe, Maybe, Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3, V4, V5]>; static merge(values: [Maybe, Maybe, Maybe, Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3, V4, V5, V6]>; static merge(values: [Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3, V4, V5, V6, V7]>; static merge(values: [Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3, V4, V5, V6, V7, V8]>; static merge(values: [Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe]): Maybe<[V1, V2, V3, V4, V5, V6, V7, V8, V9]>; static merge(values: [ Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe, Maybe ]): Maybe<[V1, V2, V3, V4, V5, V6, V7, V8, V9, V10]>; static merge(maybies: Array>): Maybe; static from(v: T): Maybe; static fromNullable(v: T): Maybe>; private static _noneInstance; static none(): Maybe; static just(v: T): Maybe; private constructor(); isNone(): this is MaybeConstructor; isJust(): this is MaybeConstructor; join(this: Maybe>): Maybe; map(f: (r: T) => V): Maybe; mapNullable(f: (r: T) => V | null | undefined): Maybe>; asyncMap(f: (r: T) => Promise): Promise>; apply(this: Maybe<(a: A) => B>, arg: Maybe): Maybe; apply(this: Maybe, fn: Maybe<(a: A) => B>): Maybe; asyncApply(this: Maybe<(a: A) => Promise>, arg: Maybe | A>): Promise>; asyncApply(this: Maybe | A>, fn: Maybe<(a: A) => Promise>): Promise>; chain(f: (r: T) => Maybe): Maybe; asyncChain(f: (r: T) => Promise>): Promise>; or(x: Maybe): Maybe; unwrap(errorFactory?: () => unknown): T; unwrapOr(x: T): T; unwrapOrElse(f: () => T): T; fold(mapNone: (value: undefined) => C, mapJust: (r: T) => C): C; get [Symbol.toStringTag](): string; } export type Maybe = MaybeConstructor | MaybeConstructor; export declare const merge: typeof MaybeConstructor.merge, just: typeof MaybeConstructor.just, none: typeof MaybeConstructor.none, from: typeof MaybeConstructor.from, fromNullable: typeof MaybeConstructor.fromNullable, chain: typeof MaybeConstructor.chain; export declare const isMaybe: (value: unknown) => value is Maybe; export {};