diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index ad465c5c3..53c98e9d7 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -4215,15 +4215,6 @@ declare module _ { //_.each interface LoDashStatic { - /** - * @see _.forEach - */ - each( - collection: string, - iteratee?: StringIterator, - thisArg?: any - ): string; - /** * @see _.forEach */ @@ -4250,6 +4241,24 @@ declare module _ { iteratee?: DictionaryIterator, thisArg?: any ): Dictionary; + + /** + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; } interface LoDashImplicitWrapper { @@ -4257,7 +4266,7 @@ declare module _ { * @see _.forEach */ each( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -4287,7 +4296,7 @@ declare module _ { * @see _.forEach */ each( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; } @@ -4314,15 +4323,6 @@ declare module _ { //_.eachRight interface LoDashStatic { - /** - * @see _.forEachRight - */ - eachRight( - collection: string, - iteratee?: StringIterator, - thisArg?: any - ): string; - /** * @see _.forEachRight */ @@ -4349,6 +4349,24 @@ declare module _ { iteratee?: DictionaryIterator, thisArg?: any ): Dictionary; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; } interface LoDashImplicitWrapper { @@ -4356,7 +4374,7 @@ declare module _ { * @see _.forEachRight */ eachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -4386,7 +4404,7 @@ declare module _ { * @see _.forEachRight */ eachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; } @@ -5089,15 +5107,6 @@ declare module _ { * @param iteratee The function invoked per iteration. * @param thisArg The this binding of iteratee. */ - forEach( - collection: string, - iteratee?: StringIterator, - thisArg?: any - ): string; - - /** - * @see _.forEach - */ forEach( collection: T[], iteratee?: ListIterator, @@ -5121,6 +5130,24 @@ declare module _ { iteratee?: DictionaryIterator, thisArg?: any ): Dictionary; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; } interface LoDashImplicitWrapper { @@ -5128,7 +5155,7 @@ declare module _ { * @see _.forEach */ forEach( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -5158,7 +5185,7 @@ declare module _ { * @see _.forEach */ forEach( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; } @@ -5194,15 +5221,6 @@ declare module _ { * @param iteratee The function called per iteration. * @param thisArg The this binding of callback. */ - forEachRight( - collection: string, - iteratee?: StringIterator, - thisArg?: any - ): string; - - /** - * @see _.forEachRight - */ forEachRight( collection: T[], iteratee?: ListIterator, @@ -5226,6 +5244,24 @@ declare module _ { iteratee?: DictionaryIterator, thisArg?: any ): Dictionary; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; } interface LoDashImplicitWrapper { @@ -5233,7 +5269,7 @@ declare module _ { * @see _.forEachRight */ forEachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -5263,7 +5299,7 @@ declare module _ { * @see _.forEachRight */ forEachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; }