diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3498507fa..b282c4991 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -627,6 +627,7 @@ var result = _.cloneDeep(stoogesAges, function(value) { var foodDefaults = { 'name': 'apple' }; result = _.defaults(foodDefaults, { 'name': 'banana', 'type': 'fruit' }); +result = _(foodDefaults).defaults({ 'name': 'banana', 'type': 'fruit' }); result = _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 61c01a65b..2e085cc29 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2677,6 +2677,13 @@ declare module _ { object: any, ...sources: any[]): any; + interface LoDashWrapper { + /** + * @see _.defaults + **/ + defaults(...sources: any[]): LoDashWrapper + } + /** * This method is like _.findIndex except that it returns the key of the first element that * passes the callback check, instead of the element itself.