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

This commit is contained in:
Brian Zengel
2014-06-02 22:18:12 -04:00
parent b599ab50cc
commit f100b9e970
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -533,6 +533,9 @@ result = <string[]>_(['banana', 'strawberry', 'apple']).sortBy('length').value()
result = <IStoogesCombined[]>_.where(stoogesCombined, { 'age': 40 });
result = <IStoogesCombined[]>_.where(stoogesCombined, { 'quotes': ['Poifect!'] });
result = <IStoogesCombined[]>_(stoogesCombined).where({ 'age': 40 }).value();
result = <IStoogesCombined[]>_(stoogesCombined).where({ 'quotes': ['Poifect!'] }).value();
/*************
* Functions *
*************/
+7
View File
@@ -4418,6 +4418,13 @@ declare module _ {
properties: U): T[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.where
**/
where<T, U extends {}>(properties: U): LoDashArrayWrapper<T>;
}
/*************
* Functions *
*************/