diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts
index d8d08a3b75..ef76d966c4 100644
--- a/underscore/underscore.d.ts
+++ b/underscore/underscore.d.ts
@@ -3,6 +3,8 @@
// Definitions by: Boris Yankov , Josh Baldwin , Christopher Currens
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+import IterateeMatcherShorthand = _.IterateeMatcherShorthand;
+import IterateePropertyShorthand = _.IterateePropertyShorthand;
declare module _ {
/**
* underscore.js _.throttle options.
@@ -67,6 +69,10 @@ declare module _ {
(element: T, key: string, list: Dictionary): TResult;
}
+ type IterateePropertyShorthand = string | number;
+
+ type IterateeMatcherShorthand = Dictionary;
+
interface MemoIterator {
(prev: TResult, curr: T, index: number, list: List): TResult;
}
@@ -146,7 +152,7 @@ interface UnderscoreStatic {
**/
map(
list: _.List,
- iterator: _.ListIterator,
+ iterator: _.ListIterator | _.IterateePropertyShorthand | _.IterateeMatcherShorthand,
context?: any): TResult[];
/**
@@ -158,15 +164,16 @@ interface UnderscoreStatic {
**/
map(
object: _.Dictionary,
- iterator: _.ObjectIterator,
+ iterator: _.ObjectIterator ,
context?: any): TResult[];
+
/**
* @see _.map
**/
collect(
list: _.List,
- iterator: _.ListIterator,
+ iterator: _.ListIterator | _.IterateePropertyShorthand | _.IterateeMatcherShorthand,
context?: any): TResult[];
/**
@@ -900,7 +907,7 @@ interface UnderscoreStatic {
uniq(
array: _.List,
isSorted?: boolean,
- iterator?: _.ListIterator,
+ iterator?: _.ListIterator | _.IterateePropertyShorthand,
context?: any): T[];
/**
@@ -916,7 +923,7 @@ interface UnderscoreStatic {
**/
unique(
array: _.List,
- iterator?: _.ListIterator,
+ iterator?: _.ListIterator | _.IterateePropertyShorthand,
context?: any): T[];
/**