export type TGetIntersectionArgs = Parameters; export type TGetIntersectionReturn = ReturnType; /** * Gets Array of intersection of two given Arrays * @template T * @param {Array} arr1 first source Array * @param {Array} arr2 second source Array * @returns {Array} * @throws {TypeError} getIntersection: arr1 and arr2 must be arrays * @example * // How to get an intersection of two Arrays? * const arr1 = [ 1, 2, 3 ]; * const arr2 = [ 2, 3, 4, 5 ]; * const intersection = getIntersection(arr1, arr2); * console.log(intersection); // => [ 2, 3 ] * @example * // Get tags shared by an article and the active search filters * const matchingTags = getIntersection( * [ "typescript", "frontend", "seo" ], * [ "frontend", "accessibility" ] * ); // [ "frontend" ] */ export declare const getIntersection: (arr1: T[], arr2: T[]) => T[];