diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index f2402c324..d32db4e48 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -4304,15 +4304,6 @@ declare module _ { //_.each interface LoDashStatic { - /** - * @see _.forEach - */ - each( - collection: string, - iteratee?: StringIterator, - thisArg?: any - ): string; - /** * @see _.forEach */ @@ -4339,6 +4330,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 { @@ -4346,7 +4355,7 @@ declare module _ { * @see _.forEach */ each( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -4376,7 +4385,7 @@ declare module _ { * @see _.forEach */ each( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; } @@ -4403,15 +4412,6 @@ declare module _ { //_.eachRight interface LoDashStatic { - /** - * @see _.forEachRight - */ - eachRight( - collection: string, - iteratee?: StringIterator, - thisArg?: any - ): string; - /** * @see _.forEachRight */ @@ -4438,6 +4438,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 { @@ -4445,7 +4463,7 @@ declare module _ { * @see _.forEachRight */ eachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -4475,7 +4493,7 @@ declare module _ { * @see _.forEachRight */ eachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; } @@ -5129,15 +5147,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, @@ -5161,6 +5170,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 { @@ -5168,7 +5195,7 @@ declare module _ { * @see _.forEach */ forEach( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -5198,7 +5225,7 @@ declare module _ { * @see _.forEach */ forEach( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; } @@ -5234,15 +5261,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, @@ -5266,6 +5284,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 { @@ -5273,7 +5309,7 @@ declare module _ { * @see _.forEachRight */ forEachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashImplicitWrapper; } @@ -5303,7 +5339,7 @@ declare module _ { * @see _.forEachRight */ forEachRight( - iteratee: StringIterator, + iteratee: ListIterator, thisArg?: any ): LoDashExplicitWrapper; }