export type PropertyName = string | number | symbol; export type IterateeFunction = (value: T) => PropertyName; export type Iteratee = IterateeFunction | keyof T; /** * Creates an object composed of keys generated from the results of running each element of collection through iteratee * @param collection The collection to iterate over * @param iteratee The iteratee function or property name to generate the key * * @remarks * **Prototype pollution warning:** This function does not filter out * prototype-polluting keys (`__proto__`, `constructor`, `prototype`). * If processing user-controlled input, sanitize with the appropriate * `removePrototype*` helper before calling this function: * - `removePrototype` — shallow sanitization of a single object * - `removePrototypeDeep` — recursive sanitization of a single object (for deeply nested data) * - `removePrototypeMap` — shallow sanitization of an array of objects * - `removePrototypeMapDeep` — recursive sanitization of an array of objects (for deeply nested data) */ export declare function keyBy(collection: T[] | Record, iteratee?: Iteratee): Record;