mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
underscore: remove 'extends {}' constraint from each and map
This commit is contained in:
8
underscore/underscore.d.ts
vendored
8
underscore/underscore.d.ts
vendored
@@ -100,7 +100,7 @@ interface UnderscoreStatic {
|
||||
* @param iterator Iterator function for each property on `obj`.
|
||||
* @param context 'this' object in `iterator`, optional.
|
||||
**/
|
||||
each<T extends {}>(
|
||||
each<T>(
|
||||
object: _.Dictionary<T>,
|
||||
iterator: _.ObjectIterator<T, void>,
|
||||
context?: any): void;
|
||||
@@ -116,7 +116,7 @@ interface UnderscoreStatic {
|
||||
/**
|
||||
* @see _.each
|
||||
**/
|
||||
forEach<T extends {}>(
|
||||
forEach<T>(
|
||||
object: _.Dictionary<T>,
|
||||
iterator: _.ObjectIterator<T, void >,
|
||||
context?: any): void;
|
||||
@@ -142,7 +142,7 @@ interface UnderscoreStatic {
|
||||
* @param context `this` object in `iterator`, optional.
|
||||
* @return The mapped object result.
|
||||
**/
|
||||
map<T extends {}, TResult>(
|
||||
map<T, TResult>(
|
||||
object: _.Dictionary<T>,
|
||||
iterator: _.ObjectIterator<T, TResult>,
|
||||
context?: any): TResult[];
|
||||
@@ -158,7 +158,7 @@ interface UnderscoreStatic {
|
||||
/**
|
||||
* @see _.map
|
||||
**/
|
||||
collect<T extends {}, TResult>(
|
||||
collect<T, TResult>(
|
||||
object: _.Dictionary<T>,
|
||||
iterator: _.ObjectIterator<T, TResult>,
|
||||
context?: any): TResult[];
|
||||
|
||||
Reference in New Issue
Block a user