diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index cb4e14436..ee57f01f1 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -105,6 +105,8 @@ result = _([1, 2, 3]).valueOf(); * Arrays * *************/ 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 = _.rest([1, 2, 3]); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index e4a75c5c2..fb935bb6b 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -262,6 +262,13 @@ declare module _ { **/ export function compact(array: List): T[]; + interface LoDashWrapper { + /** + * @see _.compact + **/ + compact(): LoDashWrapper; + } + /** * Creates an array excluding all values of the provided arrays using strict equality for comparisons * , i.e. ===.