diff --git a/src/array.ts b/src/array.ts index a0a080c6..d51b7d55 100644 --- a/src/array.ts +++ b/src/array.ts @@ -8,7 +8,7 @@ import { isArray, isFunction } from './typed' export const group = ( array: readonly T[], getGroupId: (item: T) => Key -): Partial> => { +): Record => { return array.reduce((acc, item) => { const groupId = getGroupId(item) if (!acc[groupId]) acc[groupId] = []