declare type Ctx = import("../Ctx").Ctx; declare type VoidCtx = import("../Ctx").VoidCtx; export declare type Operator = Operator.fλ | ((data: U) => boolean) | //Filter (U extends T ? (data: T) => data is U : never); export declare namespace Operator { type fλ = fλ.Stateless | fλ.Stateful; namespace fλ { type Stateless = (data: T, prev?: undefined, isPost?: true) => Result; type Stateful = [(data: T, prev: U, isPost?: true) => Result, U]; namespace Stateful { function match(op: Operator): op is Stateful; } type Result = Result.Matched | Result.NotMatched; namespace Result { function match(result: any): result is Result; function getDetachArg(result: Result): boolean | [Ctx, undefined | Error, any]; type NotMatched = Detach | null; namespace NotMatched { function match(result: any): result is NotMatched; } type Matched = Matched.NoDetachArg | Matched.WithDetachArg; namespace Matched { type NoDetachArg = readonly [U]; type WithDetachArg = readonly [U, Detach | null]; function match(result: any): result is Matched; } type Detach = Detach.FromEvt | Detach.WithCtxArg; namespace Detach { type FromEvt = "DETACH"; namespace FromEvt { function match(detach: any): detach is FromEvt; } type WithCtxArg = { DETACH: Ctx; err: Error; } | { DETACH: Ctx; res: T; } | { DETACH: VoidCtx; err: Error; } | { DETACH: VoidCtx; }; namespace WithCtxArg { function match(detach: any): detach is WithCtxArg; } function match(detach: any): detach is Detach; } } } type Stateless = fλ.Stateless | ((data: U) => boolean) | (U extends T ? (data: T) => data is U : never); } export {};