Skip to content

Commit 0128192

Browse files
committed
Fix findIndex definition
1 parent f95f51f commit 0128192

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib/es2015.core.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ interface Array<T> {
1616
* Returns the index of the first element in the array where predicate is true, and undefined
1717
* otherwise.
1818
* @param predicate find calls predicate once for each element of the array, in ascending
19-
* order, until it finds one where predicate returns true. If such an element is found, find
20-
* immediately returns that element value. Otherwise, find returns undefined.
19+
* order, until it finds one where predicate returns true. If such an element is found,
20+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2121
* @param thisArg If provided, it will be used as the this value for each invocation of
2222
* predicate. If it is not provided, undefined is used instead.
2323
*/
24-
findIndex(predicate: (value: T) => boolean, thisArg?: any): number | undefined;
24+
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
2525

2626
/**
2727
* Returns the this object after filling the section identified by start and end with value
@@ -493,4 +493,4 @@ interface StringConstructor {
493493
* @param substitutions A set of substitution values.
494494
*/
495495
raw(template: TemplateStringsArray, ...substitutions: any[]): string;
496-
}
496+
}

0 commit comments

Comments
 (0)