- flatRollup<TObject, TReduce, TKeys>(iterable, reduce, ...keys): [...TKeys, TReduce][]
Type Parameters
TObject
TReduce
TKeys extends unknown[]
Parameters
iterable: Iterable<TObject>
reduce: ((values) => TReduce)
- (values): TReduce
Returns TReduce
Rest
...keys: {
[Index in string | number | symbol]: ((value, index, values) => TKeys[Index])
}
Returns [...TKeys, TReduce][]
Equivalent to rollup, but returns a flat array of [key0, key1, …, value] instead of nested maps.