| 1 | /**
|
|---|
| 2 | * This method is like `unzip` except that it accepts an iteratee to specify
|
|---|
| 3 | * how regrouped values should be combined. The iteratee is invoked with the
|
|---|
| 4 | * elements of each group: (...group).
|
|---|
| 5 | *
|
|---|
| 6 | * @template T, R
|
|---|
| 7 | * @param {ArrayLike<ArrayLike<T>> | null | undefined} array - The array of grouped elements to process.
|
|---|
| 8 | * @param {(...values: T[]) => R} iteratee - The function to combine regrouped values.
|
|---|
| 9 | * @returns {R[]} Returns the new array of regrouped elements.
|
|---|
| 10 | *
|
|---|
| 11 | * @example
|
|---|
| 12 | * unzipWith([[1, 10, 100], [2, 20, 200]], (a, b) => a + b);
|
|---|
| 13 | * // => [3, 30, 300]
|
|---|
| 14 | */
|
|---|
| 15 | declare function unzipWith<T, R>(array: ArrayLike<ArrayLike<T>> | null | undefined, iteratee: (...values: T[]) => R): R[];
|
|---|
| 16 | /**
|
|---|
| 17 | * This method is like `unzip` except that it accepts an iteratee to specify
|
|---|
| 18 | * how regrouped values should be combined.
|
|---|
| 19 | *
|
|---|
| 20 | * @template T
|
|---|
| 21 | * @param {ArrayLike<ArrayLike<T>> | null | undefined} array - The array of grouped elements to process.
|
|---|
| 22 | * @returns {T[][]} Returns the new array of regrouped elements.
|
|---|
| 23 | *
|
|---|
| 24 | * @example
|
|---|
| 25 | * unzipWith([[1, 10, 100], [2, 20, 200]]);
|
|---|
| 26 | * // => [[1, 2], [10, 20], [100, 200]]
|
|---|
| 27 | */
|
|---|
| 28 | declare function unzipWith<T>(array: ArrayLike<ArrayLike<T>> | null | undefined): T[][];
|
|---|
| 29 |
|
|---|
| 30 | export { unzipWith };
|
|---|