type Handler = (val: T) => string | number | boolean | undefined; /** * Return a grouped object from an array. * Take Note: This function will automatically filter out any non/empty objects from the array * * Example: * const group = groupBy([ * {tally: 20, name: 'Peter'}, * {tally: 40, name: 'Jake'}, * {tally: 5, name: 'Bob'}, * ], el => el.tally > 15); * Output: * { * false: [{tally: 5, name: 'Bob'}], * true: [{tally: 20, name: 'Peter'}, {tally: 40, name: 'Jake'}], * } * * @param {T[]} val - Array or Set to group * @param {Handler|keyof T} handler - String or a function, determines what to group by */ declare function groupBy>(val: T[] | Set, handler: Handler | keyof T): Record; export { groupBy, groupBy as default };