From bd000082baaf78309978f650264d504459feb47a Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Mon, 21 Oct 2013 01:22:02 -0400 Subject: [PATCH] added _(...).difference defs --- lodash/lodash-tests.ts | 1 + lodash/lodash.d.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 5f97a445c..86c79372e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -121,6 +121,7 @@ result = _.compact([0, 1, false, 2, '', 3]); result = <_.LoDashWrapper>_([0, 1, false, 2, '', 3]).compact(); result = _.difference([1, 2, 3, 4, 5], [5, 2, 10]); +result = <_.LoDashWrapper>_([1, 2, 3, 4, 5]).difference([5, 2, 10]); result = _.rest([1, 2, 3]); result = _.rest([1, 2, 3], 2); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 09d92d858..b4f745b0b 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -321,6 +321,14 @@ declare module _ { array: List, ...others: List[]): T[]; + interface LoDashWrapper { + /** + * @see _.difference + **/ + difference( + ...others: List[]): LoDashWrapper; + } + /** * @see _.rest **/