mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-05 17:50:03 +00:00
Allow to pass _.List<T> to OOP wrapper
This commit is contained in:
1
types/underscore/index.d.ts
vendored
1
types/underscore/index.d.ts
vendored
@@ -105,6 +105,7 @@ declare module _ {
|
||||
* @param key First argument to Underscore object functions.
|
||||
**/
|
||||
<T>(value: _.Dictionary<T>): Underscore<T>;
|
||||
<T>(value: _.List<T>): Underscore<T>;
|
||||
<T>(value: Array<T>): Underscore<T>;
|
||||
<T>(value: T): Underscore<T>;
|
||||
|
||||
|
||||
@@ -147,6 +147,10 @@ namespace TestFind {
|
||||
result = _('abc').chain().detect<string>(iterator).value();
|
||||
result = _('abc').chain().detect<string>(iterator, context).value();
|
||||
}
|
||||
|
||||
{
|
||||
_(list).map(x => x.a);
|
||||
}
|
||||
}
|
||||
|
||||
var evens = _.filter([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0);
|
||||
|
||||
Reference in New Issue
Block a user