import { Inclusion } from '@thalesrc/js-utils/array/intersection'; declare global { export interface Array { /** * #### Intersection * * Gets the intersection of the two arrays or sets * * * * * * 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"] * base.intersection(["a", "b"], false); // ["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 */ intersection(inclusion: Inclusion, allEquals?: boolean): T[]; } }