- index<TObject, TKeys>(iterable, ...keys): NestedInternMap<TObject, TObject, TKeys>
Type Parameters
TObject
TKeys extends unknown[]
Parameters
iterable: Iterable<TObject>
Rest
...keys: {
[Index in string | number | symbol]: ((value, index, values) => TKeys[Index])
}
Returns NestedInternMap<TObject, TObject, TKeys>
Equivalent to group but returns a unique value per compound key instead of an array, throwing if the key is not unique.