/** * Difference Substraction Type */ export type Substraction = T[] | Set; /** * #### Difference * * Gets the difference of the two arrays or sets * * * * * * Example: * ```typescript * import { difference } from "@thalesrc/js-utils/array"; * * const base = ["a", "b", "c", "d", "a", "b", "c", "d"]; * * difference(base, ["a", "b"]); // ["c", "d", "c", "d"] * difference(base, ["a", "b"], true); // ["c", "d", "a", "b", "c", "d"] * ``` * * Array Prototype Example: * ```typescript * import "@thalesrc/js-utils/array/proto/difference"; * * const base = ["a", "b", "c", "d", "a", "b", "c", "d"]; * * base.difference(["a", "b"]); // ["c", "d", "c", "d"] * ``` * * Set Prototype Example: * ```typescript * import "@thalesrc/js-utils/set/proto/difference"; * * const base = new Set(["a", "b", "c", "d"]); * * base.difference(["a", "b"]); // Set(["c", "d"]) * ``` * * * * * @param base Base Set or Array * @param substraction Set or Array to remove its values from the base * @param allDiff By default all the same items encountered in substraction will be removed, set this argument as true to get real difference * @returns Difference of base from substraction */ export declare function difference(base: T[], substraction: Substraction, allDiff?: boolean): T[]; export declare function difference(base: Set, substraction: Substraction, allDiff?: boolean): Set;