From c65559872b7509e07efea9ebcc9e94dfb61cb08e Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Tue, 11 Oct 2022 01:51:17 -0400 Subject: [PATCH] backend: add missing return type annotation in array.ts --- packages/backend/src/prelude/array.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/prelude/array.ts b/packages/backend/src/prelude/array.ts index 0b2830cb7..4e2088e72 100644 --- a/packages/backend/src/prelude/array.ts +++ b/packages/backend/src/prelude/array.ts @@ -84,7 +84,7 @@ export function groupOn(f: (x: T) => S, xs: T[]): T[][] { return groupBy((a, b) => f(a) === f(b), xs); } -export function groupByX(collections: T[], keySelector: (x: T) => string) { +export function groupByX(collections: T[], keySelector: (x: T) => string): Record { return collections.reduce((obj: Record, item: T) => { const key = keySelector(item); if (!Object.prototype.hasOwnProperty.call(obj, key)) {