import { ValueIterateeCustom } from '../_internal/ValueIterateeCustom.js'; /** * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. * * @template T * @param {ArrayLike | null | undefined} collection - The collection to iterate over. * @param {ValueIterateeCustom} [iteratee] - The iteratee to transform keys. * @returns {Record} Returns the composed aggregate object. * * @example * const array = [ * { dir: 'left', code: 97 }, * { dir: 'right', code: 100 } * ]; * * keyBy(array, o => String.fromCharCode(o.code)); * // => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } } * * keyBy(array, 'dir'); * // => { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } } */ declare function keyBy(collection: ArrayLike | null | undefined, iteratee?: ValueIterateeCustom): Record; /** * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. * * @template T * @param {T | null | undefined} collection - The object to iterate over. * @param {ValueIterateeCustom} [iteratee] - The iteratee to transform keys. * @returns {Record} Returns the composed aggregate object. * * @example * const obj = { a: { dir: 'left', code: 97 }, b: { dir: 'right', code: 100 } }; * keyBy(obj, o => String.fromCharCode(o.code)); * // => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } } */ declare function keyBy(collection: T | null | undefined, iteratee?: ValueIterateeCustom): Record; export { keyBy };