import { t as Maybe } from "./Maybe-BVpZiDsE.cjs"; //#region src/functions/groupBy/groupBy.d.ts /** * Takes an array and returns an object with the keys of the array mapped to the items of the array. * @param array The array to iterate over. * @param getter The function used to extract the key from each element. * @returns An object with the keys mapped to the elements. * @example * ```ts * groupBy( * [ * { id: 'a', value: 1 }, * { id: 'b', value: 1 }, * { id: 'c', value: 2 }, * ], * (item) => item.value * ) * // { * // 1: [ * // { id: 'a', value: 1 }, * // { id: 'b', value: 1 }, * // ], * // 2: [ * // { id: 'c', value: 2 }, * // ], * // } * ``` */ declare function groupBy(array: Maybe, getter: (item: T) => K): Partial>; //#endregion export { groupBy as t }; //# sourceMappingURL=groupBy-CLpObpM1.d.cts.map