/** * Accumulates entries of the given object. * * @param object - The object to reduce * @param reducer - The reducer function * @param initialValue - The initial accumulator value * @returns The accumulated value * * @category Collection * @public */ export default function reduce(objec: { [key in Key]: ValueType; }, reducer: (accumulator: AccumulatorType, value: ValueType, key: Key) => AccumulatorType, initialValue: AccumulatorType): AccumulatorType; /** * Accumulates elements of the given array. * * @param array - The array to reduce * @param reducer - The reducer function * @param initialValue - The initial accumulator value * @returns The accumulated value * * @category Collection * @public */ export default function reduce(object: ValueType[], reducer: (accumulator: AccumulatorType, element: ValueType, index: number) => AccumulatorType, initialValue: AccumulatorType): AccumulatorType;