We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abea025 commit ea58c84Copy full SHA for ea58c84
index.ts
@@ -38,9 +38,9 @@ export function reverseFn(): typeof reverse {
38
return reverse;
39
}
40
41
-export function groupBy<TElement>(array: ArrayLike<TElement>,
42
- keyOf: (element: TElement) => string): Dictionary<TElement[]> {
43
- const grouped = {} as Dictionary<TElement[]>;
+export function groupBy<T>(array: ArrayLike<T>,
+ keyOf: (element: T) => string): Dictionary<T[]> {
+ const grouped = {} as Dictionary<T[]>;
44
45
for (let i = 0; i < array.length; ++i) {
46
const element = array[i];
0 commit comments