import { F1, Curried, List } from "functools-ts"; import { Observable } from "rxjs"; export declare type DispatchOpts = { tag?: string; noReplay?: boolean; takeLatest?: boolean; }; export declare type Continuation = S | Promise> | Observable>; export declare type UpdateFn = F1>; export declare type Transitions = List>; export declare type Update = (UpdateFn | Transitions) & DispatchOpts; export declare const defer: (f: () => void) => Promise; export declare const DispatchSymbol: unique symbol; export declare type Dispatch = ((update: Update, opts?: DispatchOpts) => void) & { [DispatchSymbol]: boolean; }; export interface Dispatcher { dispatch: Dispatch; } export declare type Get = F1; export declare type Set = Curried; export interface AsyncCallTracker { latestTimestampRecorded(name: string): number; record(name: string): number; } export declare const isPromise: (cont: Continuation) => cont is Promise>; export declare const isObservable: (cont: Continuation) => cont is Observable>; export declare const isDispatch: (obj: any) => obj is Dispatch; export declare const nullDispatch: Dispatch; export interface GetAndSet { get: Get; set: Set; } export declare const isTransitions: (update: Update) => update is readonly F1>[]; export declare const childDispatchFromLens: (parentDispatch: Dispatch, lens: GetAndSet) => Dispatch; export declare const childDispatch: (parentDispatch: Dispatch, key: K) => Dispatch; export declare const childDispatchFromIndex: (parentDispatch: Dispatch, key: K, idx: number) => Dispatch; export declare const asyncCallTracker: () => AsyncCallTracker; export declare const takeLatest: (update: Update, name: string) => Update; export declare const disableReplay: (update: Update) => Update; export declare const transitions: (...updates: F1>[]) => readonly F1>[]; export declare const tag: (update: Update, name: string) => Update;