| [a762898] | 1 | import { ValueIteratee } from '../_internal/ValueIteratee.js';
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * This method is like `union` except that it accepts `iteratee` which is
|
|---|
| 5 | * invoked for each element of each `arrays` to generate the criterion by which
|
|---|
| 6 | * uniqueness is computed. The iteratee is invoked with one argument: (value).
|
|---|
| 7 | *
|
|---|
| 8 | * @template T
|
|---|
| 9 | * @param {ArrayLike<T> | null | undefined} arrays - The arrays to inspect.
|
|---|
| 10 | * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.
|
|---|
| 11 | * @returns {T[]} Returns the new array of combined values.
|
|---|
| 12 | *
|
|---|
| 13 | * @example
|
|---|
| 14 | * unionBy([2.1], [1.2, 2.3], Math.floor);
|
|---|
| 15 | * // => [2.1, 1.2]
|
|---|
| 16 | *
|
|---|
| 17 | * @example
|
|---|
| 18 | * unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
|
|---|
| 19 | * // => [{ 'x': 1 }, { 'x': 2 }]
|
|---|
| 20 | */
|
|---|
| 21 | declare function unionBy<T>(arrays: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
|
|---|
| 22 | /**
|
|---|
| 23 | * This method is like `union` except that it accepts `iteratee` which is
|
|---|
| 24 | * invoked for each element of each `arrays` to generate the criterion by which
|
|---|
| 25 | * uniqueness is computed. The iteratee is invoked with one argument: (value).
|
|---|
| 26 | *
|
|---|
| 27 | * @template T
|
|---|
| 28 | * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.
|
|---|
| 29 | * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.
|
|---|
| 30 | * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.
|
|---|
| 31 | * @returns {T[]} Returns the new array of combined values.
|
|---|
| 32 | *
|
|---|
| 33 | * @example
|
|---|
| 34 | * unionBy([2.1], [1.2, 2.3], Math.floor);
|
|---|
| 35 | * // => [2.1, 1.2]
|
|---|
| 36 | */
|
|---|
| 37 | declare function unionBy<T>(arrays1: ArrayLike<T> | null | undefined, arrays2: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
|
|---|
| 38 | /**
|
|---|
| 39 | * This method is like `union` except that it accepts `iteratee` which is
|
|---|
| 40 | * invoked for each element of each `arrays` to generate the criterion by which
|
|---|
| 41 | * uniqueness is computed. The iteratee is invoked with one argument: (value).
|
|---|
| 42 | *
|
|---|
| 43 | * @template T
|
|---|
| 44 | * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.
|
|---|
| 45 | * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.
|
|---|
| 46 | * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.
|
|---|
| 47 | * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.
|
|---|
| 48 | * @returns {T[]} Returns the new array of combined values.
|
|---|
| 49 | *
|
|---|
| 50 | * @example
|
|---|
| 51 | * unionBy([2.1], [1.2, 2.3], [3.4], Math.floor);
|
|---|
| 52 | * // => [2.1, 1.2, 3.4]
|
|---|
| 53 | */
|
|---|
| 54 | declare function unionBy<T>(arrays1: ArrayLike<T> | null | undefined, arrays2: ArrayLike<T> | null | undefined, arrays3: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
|
|---|
| 55 | /**
|
|---|
| 56 | * This method is like `union` except that it accepts `iteratee` which is
|
|---|
| 57 | * invoked for each element of each `arrays` to generate the criterion by which
|
|---|
| 58 | * uniqueness is computed. The iteratee is invoked with one argument: (value).
|
|---|
| 59 | *
|
|---|
| 60 | * @template T
|
|---|
| 61 | * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.
|
|---|
| 62 | * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.
|
|---|
| 63 | * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.
|
|---|
| 64 | * @param {ArrayLike<T> | null | undefined} arrays4 - The fourth array to inspect.
|
|---|
| 65 | * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.
|
|---|
| 66 | * @returns {T[]} Returns the new array of combined values.
|
|---|
| 67 | *
|
|---|
| 68 | * @example
|
|---|
| 69 | * unionBy([2.1], [1.2, 2.3], [3.4], [4.5], Math.floor);
|
|---|
| 70 | * // => [2.1, 1.2, 3.4, 4.5]
|
|---|
| 71 | */
|
|---|
| 72 | declare function unionBy<T>(arrays1: ArrayLike<T> | null | undefined, arrays2: ArrayLike<T> | null | undefined, arrays3: ArrayLike<T> | null | undefined, arrays4: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
|
|---|
| 73 | /**
|
|---|
| 74 | * This method is like `union` except that it accepts `iteratee` which is
|
|---|
| 75 | * invoked for each element of each `arrays` to generate the criterion by which
|
|---|
| 76 | * uniqueness is computed. The iteratee is invoked with one argument: (value).
|
|---|
| 77 | *
|
|---|
| 78 | * @template T
|
|---|
| 79 | * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.
|
|---|
| 80 | * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.
|
|---|
| 81 | * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.
|
|---|
| 82 | * @param {ArrayLike<T> | null | undefined} arrays4 - The fourth array to inspect.
|
|---|
| 83 | * @param {ArrayLike<T> | null | undefined} arrays5 - The fifth array to inspect.
|
|---|
| 84 | * @param {...Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>} iteratee - The iteratee invoked per element.
|
|---|
| 85 | * @returns {T[]} Returns the new array of combined values.
|
|---|
| 86 | *
|
|---|
| 87 | * @example
|
|---|
| 88 | * unionBy([2.1], [1.2, 2.3], [3.4], [4.5], [5.6], Math.floor);
|
|---|
| 89 | * // => [2.1, 1.2, 3.4, 4.5, 5.6]
|
|---|
| 90 | */
|
|---|
| 91 | declare function unionBy<T>(arrays1: ArrayLike<T> | null | undefined, arrays2: ArrayLike<T> | null | undefined, arrays3: ArrayLike<T> | null | undefined, arrays4: ArrayLike<T> | null | undefined, arrays5: ArrayLike<T> | null | undefined, ...iteratee: Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>): T[];
|
|---|
| 92 |
|
|---|
| 93 | export { unionBy };
|
|---|