/** * Combines multiple collections element-wise into tuples. * - All inputs must be the same type (all arrays, all Sets, or all objects). * - By default, only arrays are allowed; set `includeValues: true` to extract values from Sets/Objects. * - Stops at shortest collection by default; use `fillValue` to extend to longest. * - Transforms columns into rows for parallel iteration. * @param inputs Collections of the same type to combine * @param options Configuration: `fillValue` extends to longest, `includeValues` extracts values from Sets/Objects (default: false) * @returns Array of tuples, one per index position * @example * zip([[1, 2], ['a', 'b']]); // [[1, 'a'], [2, 'b']] * zip([[1, 2], ['a']], { fillValue: 'x' }); // [[1, 'a'], [2, 'x']] * const s1 = new Set([1, 2]); const s2 = new Set([3, 4]); * zip([s1, s2], { includeValues: true }); // [[1, 3], [2, 4]] */ export declare function zip(inputs: { [K in keyof T]: Iterable | { [key: string]: T[K]; }; }, options?: { fillValue?: T[number]; includeValues?: boolean; }): T[number][][]; /** * Combines multiple collections element-wise and transforms each tuple. * - All inputs must be the same type (all arrays, all Sets, or all objects). * - By default, only arrays are allowed; set `includeValues: true` to extract values from Sets/Objects. * - Applies a function to each set of corresponding elements. * - Useful for aggregating, computing, or transforming aligned data. * @param inputs Collections of the same type to combine * @param fn Transform function applied to each tuple * @param options Configuration: `fillValue` extends to longest, `includeValues` extracts values from Sets/Objects (default: false) * @returns Array of transformed results * @example * zipWith([[1, 2], [3, 4]], (t) => t[0] + t[1]); // [4, 6] * zipWith([[1, 2], [10]], (t) => t.reduce((a, b) => a + b, 0), { fillValue: 0 }); // [11, 2] */ export declare function zipWith(inputs: { [K in keyof T]: Iterable | { [key: string]: T[K]; }; }, fn: (tuple: T[number][]) => R, options?: { fillValue?: T[number]; includeValues?: boolean; }): R[]; /** * Unzips an array of tuples back into separate arrays. * - Reverses the zip operation: transforms rows to columns. * - Useful for separating previously combined collections. * @param zipped Array of tuples (rows) to transpose * @returns Array of arrays (columns), one per tuple position * @example * const zipped = [[1, 'a'], [2, 'b'], [3, 'c']]; * unzip(zipped); // [[1, 2, 3], ['a', 'b', 'c']] */ export declare function unzip(zipped: T[][]): T[][];