mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #3776 from gustavgahm/master
Added the findIndex function to underscore.d.ts
This commit is contained in:
Vendored
+16
-1
@@ -264,7 +264,22 @@ interface UnderscoreStatic {
|
||||
detect<T>(
|
||||
object: _.Dictionary<T>,
|
||||
iterator: _.ObjectIterator<T, boolean>,
|
||||
context?: any): T;
|
||||
context?: any): T;
|
||||
|
||||
/**
|
||||
* Looks through each value in the list, returning the index of the first one that passes a truth
|
||||
* test (iterator). The function returns as soon as it finds an acceptable element,
|
||||
* and doesn't traverse the entire list.
|
||||
* @param list Searches for a value in this list.
|
||||
* @param iterator Search iterator function for each element in `list`.
|
||||
* @param context `this` object in `iterator`, optional.
|
||||
* @return The index of the first acceptable found element in `list`, if nothing is found -1 is returned.
|
||||
**/
|
||||
findIndex<T>(
|
||||
list: _.List<T>,
|
||||
iterator: _.ListIterator<T, boolean>,
|
||||
context?: any): T;
|
||||
|
||||
|
||||
/**
|
||||
* Looks through each value in the list, returning an array of all the values that pass a truth
|
||||
|
||||
Reference in New Issue
Block a user