mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
_(...).find
This commit is contained in:
1 parent
824029abf4
commit
2507e73a5f
2 files changed
+27
No files matched your search
@@ -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