diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 205df9f569..081a62cbd7 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -576,10 +576,9 @@ declare namespace R { * Takes a function and two values in its domain and returns true if the values map to the same value in the * codomain; false otherwise. */ - eqBy(fn: (a: T) => T, a: T, b: T): boolean; - eqBy(fn: (a: T) => T, a: T): (b: T) => boolean; - eqBy(fn: (a: T) => T): (a: T, b: T) => boolean; - eqBy(fn: (a: T) => T): (a: T) => (b: T) => boolean; + eqBy(fn: (a: T) => U, a: T, b: T): boolean; + eqBy(fn: (a: T) => U, a: T): (b: T) => boolean; + eqBy(fn: (a: T) => U): CurriedFunction2; /** * Reports whether two functions have the same value for the specified property. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 8aef1c65fc..c32ab72028 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -2136,6 +2136,14 @@ class Rectangle { const c: (a: any[]) => any[] = R.symmetricDifferenceWith(eqA)(l1); // => [{a: 1}, {a: 2}, {a: 5}, {a: 6}] }; +() => { + const eqL = R.eqBy(s => s.length); + const l1 = ['bb', 'ccc', 'dddd']; + const l2 = ['aaa', 'bb', 'c']; + R.symmetricDifferenceWith(eqL, l1, l2); // => ['dddd', 'c'] + R.symmetricDifferenceWith(eqL)(l1, l2); // => ['dddd', 'c'] +}; + /***************************************************************** * String category */