ts-prime
Version:
A utility library for JavaScript and Typescript.
20 lines • 753 B
TypeScript
import { LazyResult } from './_reduceLazy';
/**
* Returns a list of elements that exist in both array.
* @param array the source array
* @param other the second array
* @signature
* P.intersection(array, other)
* @signature
* P.intersection(other)(array)
* @example
* P.intersection([1, 2, 3], [2, 3, 5]) // => [2, 3]
* P.intersection([2, 3, 5])([1, 2, 3]) // => [2, 3]
* @category Array, Pipe
*/
export declare function intersection<T>(source: readonly T[], other: readonly T[]): T[];
export declare function intersection<T, K>(other: readonly T[]): (source: readonly K[]) => T[];
export declare namespace intersection {
function lazy<T>(other: T[]): (value: T) => LazyResult<T>;
}
//# sourceMappingURL=intersection.d.ts.map