/** * Intersection Inclusion Type */ export type Inclusion = any[] | Set; /** * Intersection * * Gets the intersection of the two arrays or sets * * * * * * _Example:_ * ```typescript * import { intersection } from "@thalesrc/js-utils/array"; * * const base = ["a", "b", "c", "d", "a", "b", "c", "d"]; * * intersection(base, ["a", "b", "x"]); // ["a", "b", "a", "b"] * intersection(base, ["a", "b", "x"], false); // ["a", "b"] * ``` * * _Array Prototype Example:_ * ```typescript * import "@thalesrc/js-utils/array/proto/intersection"; * * const base = ["a", "b", "c", "d", "a", "b", "c", "d"]; * * base.intersection(["a", "b"]); // ["a", "b", "a", "b"] * ``` * * _Set Prototype Example:_ * ```typescript * import "@thalesrc/js-utils/set/proto/intersection"; * * const base = new Set(["a", "b", "c", "d"]); * * base.intersection(["a", "b"]); // Set(["a", "b"]) * ``` * * * * * @param base Base Set or Array * @param inclusion Set or Array to include its values * @param allEquals By default all the same items encountered in the inclusion will be included, set this argument as false to get real intersection * @returns Intersection of base and inclusion */ export declare function intersection(base: T[], inclusion: Inclusion, allEquals?: boolean): T[]; export declare function intersection(base: Set, inclusion: Inclusion, allEquals?: boolean): Set;