UNPKG

581 BTypeScriptView Raw
1import { AnyIterable } from './types';
2export declare function _reduce<T, B>(func: (acc: B, value: T) => B, start: B, iterable: AnyIterable<T>): Promise<B>;
3export declare function reduce<T, B>(func: (acc: B, value: T) => B): {
4 (start: B): (iterable: AnyIterable<T>) => Promise<B>;
5 (start: B, iterable: AnyIterable<T>): Promise<B>;
6};
7export declare function reduce<T, B>(func: (acc: B, value: T) => B, start: B): (iterable: AnyIterable<T>) => Promise<B>;
8export declare function reduce<T, B>(func: (acc: B, value: T) => B, start: B, iterable: AnyIterable<T>): Promise<B>;