import { Equality, Factory, Function1, Predicate, Reducer, Tuple2, TypePredicate, Updater } from "./functions.js"; export declare const Computation_T: unique symbol; export declare const Computation_type: unique symbol; /** * @noInheritDoc */ export interface Computation { readonly [Computation_T]?: unknown; readonly [Computation_type]?: unknown; } export type ComputationOf = C extends { readonly [Computation_type]?: unknown; } ? NonNullable<(C & { readonly [Computation_T]: T; })[typeof Computation_type]> : { readonly _C: C; readonly _T: () => T; }; export type ComputationOperator = Function1, ComputationOf>; export interface DeferredComputationModule { fromReadonlyArray(options?: { readonly count?: number; readonly start?: number; }): Function1>; generate(generator: Updater, initialValue: Factory): ComputationOf; } export interface PureStatelessComputationModule { keep(predicate: Predicate): ComputationOperator; map(selector: Function1): ComputationOperator; } export interface PureStatefulComputationModule { buffer(options?: { count?: number; }): ComputationOperator; decodeWithCharset(options?: { readonly charset?: string; readonly fatal?: boolean; readonly ignoreBOM?: boolean; }): ComputationOperator; distinctUntilChanged(options?: { readonly equality?: Equality; }): ComputationOperator; pairwise(): ComputationOperator>; scan(scanner: Reducer, initialValue: Factory): ComputationOperator; skipFirst(options?: { readonly count?: number; }): ComputationOperator; takeFirst(options?: { readonly count?: number; }): ComputationOperator; takeWhile(predicate: Predicate, options?: { readonly inclusive?: boolean; }): ComputationOperator; } export interface Pick { (key: TKeyOfT): ComputationOperator; (keyA: TKeyOfTA, keyB: TKeyOfTB): ComputationOperator; (keyA: TKeyOfTA, keyB: TKeyOfTB, keyC: TKeyOfTC): ComputationOperator; } interface Signature { keepType(keep: PureStatelessComputationModule["keep"]): (predicate: TypePredicate) => ComputationOperator; mapTo(map: PureStatelessComputationModule["map"]): (value: T) => ComputationOperator; pick(map: PureStatelessComputationModule["map"]): Pick; sequence(generate: DeferredComputationModule["generate"]): (start: number) => ComputationOf; } export declare const keepType: Signature["keepType"]; export declare const mapTo: Signature["mapTo"]; export declare const pick: Signature["pick"]; export declare const sequence: Signature["sequence"]; export {};