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