/** * Creates an array of unique values, in order, from all given arrays, * using SameValueZero for equality comparisons. * * @param arrays - The arrays to inspect * @returns Returns the new array of combined values * * @example * union([2], [1, 2]); * // => [2, 1] */ export declare function union(...arrays: readonly T[][]): T[]; /** * This method is like `union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by * which uniqueness is computed. * * @param arrays - The arrays to inspect * @param iteratee - The iteratee invoked per element * @returns Returns the new array of combined values */ export declare function unionBy(...args: [...arrays: readonly T[][], iteratee: (value: T) => U]): T[]; /** * This method is like `union` except that it accepts `comparator` which * is invoked to compare elements of `arrays`. * * @param arrays - The arrays to inspect * @param comparator - The comparator invoked per element * @returns Returns the new array of combined values */ export declare function unionWith(...args: [ ...arrays: readonly T[][], comparator: (arrVal: T, othVal: T) => boolean ]): T[]; /** * Creates a duplicate-free version of an array, using SameValueZero for * equality comparisons, in which only the first occurrence of each element * is kept. The order of result values is determined by the order they occur * in the array. * * @param array - The array to inspect * @returns Returns the new duplicate free array * * @example * uniq([2, 1, 2]); * // => [2, 1] */ export declare function uniq(array: readonly T[]): T[]; /** * This method is like `uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * uniqueness is computed. * * @param array - The array to inspect * @param iteratee - The iteratee invoked per element * @returns Returns the new duplicate free array * * @example * uniqBy([2.1, 1.2, 2.3], Math.floor); * // => [2.1, 1.2] * * // The `property` iteratee shorthand. * uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ export declare function uniqBy(array: readonly T[], iteratee: (value: T) => U): T[]; /** * This method is like `uniq` except that it accepts `comparator` which * is invoked to compare elements of `array`. * * @param array - The array to inspect * @param comparator - The comparator invoked per element * @returns Returns the new duplicate free array * * @example * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * uniqWith(objects, isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ export declare function uniqWith(array: readonly T[], comparator: (arrVal: T, othVal: T) => boolean): T[];