/** * Groups an array of objects by the specified key. * * @example * const input = [ * { id: 1, category: 'a' }, * { id: 2, category: 'a' }, * { id: 3, category: 'b' }, * ]; * * const result = groupBy(input, 'category'); * // result will be { a: [{ id: 1 }, { id: 2 }], b: [{ id: 3 }] } */ export declare function groupBy, K extends keyof T>(array: T[], key: K): Record;