diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 54292f1f7c..6cf29b5e51 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -22,6 +22,7 @@ // Bonggyun Lee // Maciek Blim // Marcin Biernat +// Rayhaneh Banyassady // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -523,6 +524,7 @@ declare namespace R { * elements. */ differenceWith(pred: (a: T, b: T) => boolean, list1: ReadonlyArray, list2: ReadonlyArray): T[]; + differenceWith(pred: (a: T, b: T) => boolean): (list1: ReadonlyArray, list2: ReadonlyArray) => T[]; /* * Returns a new object that does not contain a prop property. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index c9b8cb0841..9d0120b8aa 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1957,6 +1957,9 @@ class Rectangle { const l1 = [{a: 1}, {a: 2}, {a: 3}]; const l2 = [{a: 3}, {a: 4}]; R.differenceWith(cmp, l1, l2); // => [{a: 1}, {a: 2}] + + const differenceWithCurried = R.differenceWith(cmp); + differenceWithCurried(l1, l2); // =>[{a: 1}, {a: 2}] }; () => {