export type ReduceFunc> = (acc: R, value: O[keyof O], key: keyof O & string, obj: O) => R; interface ReduceObj { >(fn: ReduceFunc, acc: R, obj: O): R; (fn: ReduceFunc, acc: R): (obj: any) => R; (fn: ReduceFunc): { (acc: R, obj: any): R; (acc: R): (obj: any) => R; }; } /** * Returns a single item by iterating through the obj, successively calling * the iterator function and passing it an accumulator value, current * value and current key from the obj, and then passing the result to the next call. * * @param {Function} fn The iterator function. Receives three argument, `accumulator`, `value`, `key`. * @param {*} acc The accumulator value. * @param {Object} obj The object to iterate over. * @return {*} The final, accumulated value. * @example * * var obj = { a: 1, b: 2, c: 3}; * var plus = (a, b) => a + b; * * reduce(plus, 10, obj); //=> 16 */ declare const _default: ReduceObj; export default _default;