/** * Creates an array of unique values that are included in all given arrays, using a comparator function for equality comparisons. * * @template T, U * @param {ArrayLike | null | undefined} array - The array to inspect. * @param {ArrayLike} values - The values to compare. * @param {(a: T, b: T | U) => boolean} comparator - The comparator invoked per element. * @returns {T[]} Returns the new array of intersecting values. * * @example * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * const others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * intersectionWith(objects, others, (a, b) => a.x === b.x && a.y === b.y); * // => [{ 'x': 1, 'y': 2 }] */ declare function intersectionWith(array: ArrayLike | null | undefined, values: ArrayLike, comparator: (a: T, b: T | U) => boolean): T[]; /** * Creates an array of unique values that are included in all given arrays, using a comparator function for equality comparisons. * * @template T, U, V * @param {ArrayLike | null | undefined} array - The array to inspect. * @param {ArrayLike} values1 - The first values to compare. * @param {ArrayLike} values2 - The second values to compare. * @param {(a: T, b: T | U | V) => boolean} comparator - The comparator invoked per element. * @returns {T[]} Returns the new array of intersecting values. * * @example * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * const others1 = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * const others2 = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }]; * intersectionWith(objects, others1, others2, (a, b) => a.x === b.x && a.y === b.y); * // => [{ 'x': 1, 'y': 2 }] */ declare function intersectionWith(array: ArrayLike | null | undefined, values1: ArrayLike, values2: ArrayLike, comparator: (a: T, b: T | U | V) => boolean): T[]; /** * Creates an array of unique values that are included in all given arrays, using a comparator function for equality comparisons. * * @template T, U, V, W * @param {ArrayLike | null | undefined} array - The array to inspect. * @param {ArrayLike} values1 - The first values to compare. * @param {ArrayLike} values2 - The second values to compare. * @param {...Array | (a: T, b: T | U | V | W) => boolean>} values - The other arrays to compare, and the comparator to use. * @returns {T[]} Returns the new array of intersecting values. * * @example * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * const others1 = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * const others2 = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }]; * const others3 = [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]; * intersectionWith(objects, others1, others2, others3, (a, b) => a.x === b.x && a.y === b.y); * // => [{ 'x': 1, 'y': 2 }] */ declare function intersectionWith(array: ArrayLike | null | undefined, values1: ArrayLike, values2: ArrayLike, ...values: Array | ((a: T, b: T | U | V | W) => boolean)>): T[]; /** * Creates an array of unique values that are included in all given arrays. * * @template T * @param {ArrayLike | null} [array] - The array to inspect. * @param {...Array | (a: T, b: never) => boolean>} values - The values to compare. * @returns {T[]} Returns the new array of intersecting values. * * @example * intersectionWith([2, 1], [2, 3]); * // => [2] */ declare function intersectionWith(array?: ArrayLike | null, ...values: Array | ((a: T, b: never) => boolean)>): T[]; export { intersectionWith };