UNPKG

@rxx/worker

Version:

React MVI micro framework.

19 lines (18 loc) 660 B
/** * @fileoverview * @author Taketoshi Aono */ import { Observable, OperatorFunction } from 'rxjs'; interface FlatScanAggregateReturnType { aggregate: true; payload: any; } /** * Return type of flatscan. */ export declare type FlatScanReturnType<T> = T | Promise<T> | Observable<T> | FlatScanAggregateReturnType | null | undefined; export interface FlatScanOptions<T> { bufferingConfig?(value: T): number; } export declare function flatScan<T, U>(handler: (acc: T, value: U) => FlatScanReturnType<T> | Promise<FlatScanReturnType<T>>, initial?: T | Observable<T> | Promise<T>, options?: FlatScanOptions<U>): OperatorFunction<U, T>; export {};