/** Selector function to determine the value of a group key */ export declare type GroupBySelectorFn = (obj: T) => any; /** * The "multi" result of a {@link groupBy} call. Describes an array holding exactly 2 values. The first value stores * the accumulation result of the main grouping mechanism inside a plain object the second value preserves any * foreign values that could be associated with a group */ export declare type GroupByResult = [ /** Holds all values that could be associated with a group under their respective {@link GroupBySelectorFn} keys */ Record, /** Holds all foreign values that couldn't be associated with any group */ T[] ]; /** * Groups the values of an {@link Iterable} into a {@link Record} of respective {@link GroupBySelectorFn} key results, * while preserving any non associated value in an {@link Array} of foreign values * * @param iterable The {@link Iterable} values that should be grouped by their respective keys * @param groupBySelectorFn The selector function that should resolve the desired group key values */ export declare function groupBy(iterable: Iterable, groupBySelectorFn: GroupBySelectorFn): GroupByResult;