UNPKG

graphql

Version:

A Query Language and Runtime which can target any service.

8 lines (7 loc) 203 B
/** * Groups array items into a Map, given a function to produce grouping key. */ export declare function groupBy<K, T>( list: ReadonlyArray<T>, keyFn: (item: T) => K, ): Map<K, ReadonlyArray<T>>;