mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-01 03:20:46 +08:00
[ramda] Updated differenceWith typing
This commit is contained in:
2
types/ramda/index.d.ts
vendored
2
types/ramda/index.d.ts
vendored
@@ -22,6 +22,7 @@
|
||||
// Bonggyun Lee <https://github.com/deptno>
|
||||
// Maciek Blim <https://github.com/blimusiek>
|
||||
// Marcin Biernat <https://github.com/biern>
|
||||
// Rayhaneh Banyassady <https://github.com/rayhaneh>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -523,6 +524,7 @@ declare namespace R {
|
||||
* elements.
|
||||
*/
|
||||
differenceWith<T>(pred: (a: T, b: T) => boolean, list1: ReadonlyArray<T>, list2: ReadonlyArray<T>): T[];
|
||||
differenceWith<T>(pred: (a: T, b: T) => boolean): <T> (list1: ReadonlyArray<T>, list2: ReadonlyArray<T>) => T[];
|
||||
|
||||
/*
|
||||
* Returns a new object that does not contain a prop property.
|
||||
|
||||
@@ -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}]
|
||||
};
|
||||
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user