/** * Groups elements of an array into buckets based on a distribution function. * * Unlike a simple map, each element can be assigned to one or multiple keys. * The result is an object where each key maps to an array of elements that * were assigned to it. * * Why this exists: * This utility is useful when you need flexible grouping logic where an item * may belong to multiple categories (e.g., tagging systems, multi-indexing). * * Notes: * - Uses a null-prototype object to prevent prototype pollution and ensure * clean key usage. * * @template E - Type of elements in the input array * @template K - Type of keys used for grouping * * @param elements - The array of elements to distribute (optional) * @param getKeys - Function that returns one or more keys for each element * * @returns A partial record mapping each key to an array of grouped elements */ export declare function distributeArray(elements: E[], getKeys: (element: E, index: number) => K | K[]): Partial>;