Added chainable definitions for _(...).pluck

This commit is contained in:
Brian Zengel
2014-06-02 10:19:05 -04:00
parent 6e70ecce98
commit 4a64d7cdf0
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -419,6 +419,7 @@ result = <IStoogesAge>_.min(stoogesAges, function (stooge) { return stooge.age;
result = <IStoogesAge>_.min(stoogesAges, 'age');
result = <string[]>_.pluck(stoogesAges, 'name');
result = <string[]>_(stoogesAges).pluck('name').value();
interface ABC {
[index: string]: number;
+16
View File
@@ -3444,6 +3444,22 @@ declare module _ {
property: string): any[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.pluck
**/
pluck<T extends {}>(
property: string): LoDashArrayWrapper<any>;
}
interface LoDashObjectWrapper<T> {
/**
* @see _.pluck
**/
pluck<T extends {}>(
property: string): LoDashArrayWrapper<any>;
}
//_.reduce
interface LoDashStatic {
/**