diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 54292f1f7c..52e4becc10 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,8 @@ 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[]; + 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..ee9e7512e1 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1957,6 +1957,12 @@ 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 differenceWithCurried1 = R.differenceWith(cmp); + differenceWithCurried1(l1, l2); // =>[{a: 1}, {a: 2}] + + const differenceWithCurried2 = R.differenceWith(cmp, l1); + differenceWithCurried2(l2); // =>[{a: 1}, {a: 2}] }; () => {