import { IsLiteral } from "type-fest"; //#region src/functions/difference/difference.d.ts /** * Gets the difference between two arrays. * @param array1 The first array. * @param array2 The second array. * @param comparator A function that determines whether two items are equal. * @returns An array with the difference between the two arrays - items that are in the first array but not in the second. * @example * ```ts * difference([1, 2, 3], [2, 3, 4]) // [2, 3] * ``` */ declare function difference(array1: readonly T[], array2: readonly S[], comparator?: Comparator): Array | IsLiteral extends true ? Exclude : T>; /** * Gets the difference between two arrays. * @param array1 The first array. * @param array2 The second array. * @param comparator A function that determines whether two items are equal. * @returns An array with the difference between the two arrays - items that are in the first array but not in the second. * @example * ```ts * difference([1, 2, 3], [2, 3, 4]) // [2, 3] * ``` */ declare function difference(array1: readonly T[], array2: readonly S[], comparator?: Comparator): Array | IsLiteral extends true ? Exclude : T>; type Comparator = ((a: T, b: S) => a is Exclude) | ((a: T, b: S) => boolean); //#endregion export { difference as t }; //# sourceMappingURL=difference-CwD4FNgU.d.ts.map