diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index ff41747fc..b104a69da 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -677,6 +677,10 @@ result = _.forIn(new Dog('Dagny'), function(value, key) { console.log(key); }); + result = <_.LoDashObjectWrapper>_(new Dog('Dagny')).forIn(function(value, key) { + console.log(key); + }); + result = _.forInRight(new Dog('Dagny'), function(value, key) { console.log(key); }); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 2b6dfb628..9ba7da043 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1693,14 +1693,14 @@ declare module _ { **/ forEachRight( callback: ListIterator, - thisArg?: any): LoDashArrayWrapper>; + thisArg?: any): LoDashArrayWrapper; /** * @see _.forEachRight **/ eachRight( callback: ListIterator, - thisArg?: any): LoDashArrayWrapper>; + thisArg?: any): LoDashArrayWrapper; } interface LoDashObjectWrapper { @@ -3246,6 +3246,15 @@ declare module _ { thisArg?: any): Dictionary; } + interface LoDashObjectWrapper { + /** + * @see _.forIn + **/ + forIn( + callback?: ObjectIterator, + thisArg?: any): Dictionary; + } + //_.forInRight interface LoDashStatic { /**