mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added chainable definitions for _(...).where
This commit is contained in:
@@ -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 *
|
||||
*************/
|
||||
|
||||
Vendored
+7
@@ -4418,6 +4418,13 @@ declare module _ {
|
||||
properties: U): T[];
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.where
|
||||
**/
|
||||
where<T, U extends {}>(properties: U): LoDashArrayWrapper<T>;
|
||||
}
|
||||
|
||||
/*************
|
||||
* Functions *
|
||||
*************/
|
||||
|
||||
Reference in New Issue
Block a user