mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
_(...).find
This commit is contained in:
@@ -383,6 +383,11 @@ result = <number>_.find([1, 2, 3, 4], function (num) {
|
||||
});
|
||||
result = <IFoodCombined>_.find(foodsCombined, { 'type': 'vegetable' });
|
||||
result = <IFoodCombined>_.find(foodsCombined, 'organic');
|
||||
result = <number>_([1, 2, 3, 4]).find(function (num) {
|
||||
return num % 2 == 0;
|
||||
});
|
||||
result = <IFoodCombined>_(foodsCombined).find({ 'type': 'vegetable' });
|
||||
result = <IFoodCombined>_(foodsCombined).find('organic');
|
||||
|
||||
result = <number>_.detect([1, 2, 3, 4], function (num) {
|
||||
return num % 2 == 0;
|
||||
|
||||
Vendored
+22
@@ -2872,6 +2872,28 @@ declare module _ {
|
||||
pluckValue: string): T;
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.find
|
||||
*/
|
||||
find(
|
||||
callback: ListIterator<T, boolean>,
|
||||
thisArg?: any): T;
|
||||
/**
|
||||
* @see _.find
|
||||
* @param _.where style callback
|
||||
*/
|
||||
find<W>(
|
||||
whereValue: W): T;
|
||||
|
||||
/**
|
||||
* @see _.find
|
||||
* @param _.where style callback
|
||||
*/
|
||||
find(
|
||||
pluckValue: string): T;
|
||||
}
|
||||
|
||||
//_.findLast
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user