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 **/