import type { ReadOnlyArray, ReadOnlyRecord, Unary } from "@vangware/types"; /** * Groups values of an iterable or asynchronous iterable in an object based on * the output of the `grouper` function. * * @category Reducers * @example * ```typescript * const groupByType = groupBy((value: number) => number % 2 === 0 ? "even" : "odd"); * groupByType([1, 2, 3, 4, 5]); // { even: [2, 4], odd: [1, 3, 5] } * ``` * @param grouper Grouper function. * @returns Object with grouped values. */ export declare const groupBy: ( grouper: Unary, ) => >( iterable: Iterable_1, ) => import("./index.js").ReducerOutput< Iterable_1, ReadOnlyRecord> >;