diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 5ff9a54fce..7344c2c3a4 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -754,6 +754,7 @@ declare namespace R { * Combines two lists into a set (i.e. no duplicates) composed of those elements common to both lists. */ intersection(list1: T[], list2: T[]): T[]; + intersection(list1: T[]): (list2: T[]) => T[]; /** * Combines two lists into a set (i.e. no duplicates) composed of those diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index f6afc8d29d..2a4b27056b 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -2241,3 +2241,6 @@ class Why { R.intersperse(0, [1, 2]); // => [1, 0, 2] R.intersperse(0, [1]); // => [1] }; + +R.intersection([1, 2, 3], [2, 3, 3, 4]) // => [2, 3] +R.intersection([1, 2, 3])([2, 3, 3, 4]) // => [2, 3]