From 951fd3692d747514a3cc9046c291aa70bbbb83ed Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Sun, 10 Nov 2013 18:27:20 -0500 Subject: [PATCH] _(...).forIn definitions --- lodash/lodash-tests.ts | 4 ++++ lodash/lodash.d.ts | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) 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 { /**