UNPKG

tsoid

Version:

Typed functional library to deal with async operations.

10 lines (9 loc) 343 B
import { FunctionPromiseA2 } from './types'; /** * Reduce an array of elements into a value, based in an async reducer function. * * @param {function} reducerFn * @param {any} base * @param {any[]} traversable */ export default function reduce<A, B>(reducerFn: FunctionPromiseA2<B, A, B>, base: B, traversable: A[]): Promise<B | Error>;