Skip to content

Commit 5fb68da

Browse files
committed
Modified all other findIndex() definitions
1 parent 0128192 commit 5fb68da

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

src/lib/es5.d.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,12 +1528,12 @@ interface Int8Array {
15281528
* Returns the index of the first element in the array where predicate is true, and undefined
15291529
* otherwise.
15301530
* @param predicate find calls predicate once for each element of the array, in ascending
1531-
* order, until it finds one where predicate returns true. If such an element is found, find
1532-
* immediately returns that element value. Otherwise, find returns undefined.
1531+
* order, until it finds one where predicate returns true. If such an element is found,
1532+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
15331533
* @param thisArg If provided, it will be used as the this value for each invocation of
15341534
* predicate. If it is not provided, undefined is used instead.
15351535
*/
1536-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
1536+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
15371537

15381538
/**
15391539
* Performs the specified action for each element in an array.
@@ -1801,12 +1801,12 @@ interface Uint8Array {
18011801
* Returns the index of the first element in the array where predicate is true, and undefined
18021802
* otherwise.
18031803
* @param predicate find calls predicate once for each element of the array, in ascending
1804-
* order, until it finds one where predicate returns true. If such an element is found, find
1805-
* immediately returns that element value. Otherwise, find returns undefined.
1804+
* order, until it finds one where predicate returns true. If such an element is found,
1805+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
18061806
* @param thisArg If provided, it will be used as the this value for each invocation of
18071807
* predicate. If it is not provided, undefined is used instead.
18081808
*/
1809-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
1809+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
18101810

18111811
/**
18121812
* Performs the specified action for each element in an array.
@@ -2075,12 +2075,12 @@ interface Uint8ClampedArray {
20752075
* Returns the index of the first element in the array where predicate is true, and undefined
20762076
* otherwise.
20772077
* @param predicate find calls predicate once for each element of the array, in ascending
2078-
* order, until it finds one where predicate returns true. If such an element is found, find
2079-
* immediately returns that element value. Otherwise, find returns undefined.
2078+
* order, until it finds one where predicate returns true. If such an element is found,
2079+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
20802080
* @param thisArg If provided, it will be used as the this value for each invocation of
20812081
* predicate. If it is not provided, undefined is used instead.
20822082
*/
2083-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
2083+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
20842084

20852085
/**
20862086
* Performs the specified action for each element in an array.
@@ -2348,12 +2348,12 @@ interface Int16Array {
23482348
* Returns the index of the first element in the array where predicate is true, and undefined
23492349
* otherwise.
23502350
* @param predicate find calls predicate once for each element of the array, in ascending
2351-
* order, until it finds one where predicate returns true. If such an element is found, find
2352-
* immediately returns that element value. Otherwise, find returns undefined.
2351+
* order, until it finds one where predicate returns true. If such an element is found,
2352+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
23532353
* @param thisArg If provided, it will be used as the this value for each invocation of
23542354
* predicate. If it is not provided, undefined is used instead.
23552355
*/
2356-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
2356+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
23572357

23582358
/**
23592359
* Performs the specified action for each element in an array.
@@ -2622,12 +2622,12 @@ interface Uint16Array {
26222622
* Returns the index of the first element in the array where predicate is true, and undefined
26232623
* otherwise.
26242624
* @param predicate find calls predicate once for each element of the array, in ascending
2625-
* order, until it finds one where predicate returns true. If such an element is found, find
2626-
* immediately returns that element value. Otherwise, find returns undefined.
2625+
* order, until it finds one where predicate returns true. If such an element is found,
2626+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
26272627
* @param thisArg If provided, it will be used as the this value for each invocation of
26282628
* predicate. If it is not provided, undefined is used instead.
26292629
*/
2630-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
2630+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
26312631

26322632
/**
26332633
* Performs the specified action for each element in an array.
@@ -2895,12 +2895,12 @@ interface Int32Array {
28952895
* Returns the index of the first element in the array where predicate is true, and undefined
28962896
* otherwise.
28972897
* @param predicate find calls predicate once for each element of the array, in ascending
2898-
* order, until it finds one where predicate returns true. If such an element is found, find
2899-
* immediately returns that element value. Otherwise, find returns undefined.
2898+
* order, until it finds one where predicate returns true. If such an element is found,
2899+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
29002900
* @param thisArg If provided, it will be used as the this value for each invocation of
29012901
* predicate. If it is not provided, undefined is used instead.
29022902
*/
2903-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
2903+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
29042904

29052905
/**
29062906
* Performs the specified action for each element in an array.
@@ -3168,12 +3168,12 @@ interface Uint32Array {
31683168
* Returns the index of the first element in the array where predicate is true, and undefined
31693169
* otherwise.
31703170
* @param predicate find calls predicate once for each element of the array, in ascending
3171-
* order, until it finds one where predicate returns true. If such an element is found, find
3172-
* immediately returns that element value. Otherwise, find returns undefined.
3171+
* order, until it finds one where predicate returns true. If such an element is found,
3172+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
31733173
* @param thisArg If provided, it will be used as the this value for each invocation of
31743174
* predicate. If it is not provided, undefined is used instead.
31753175
*/
3176-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
3176+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
31773177

31783178
/**
31793179
* Performs the specified action for each element in an array.
@@ -3441,12 +3441,12 @@ interface Float32Array {
34413441
* Returns the index of the first element in the array where predicate is true, and undefined
34423442
* otherwise.
34433443
* @param predicate find calls predicate once for each element of the array, in ascending
3444-
* order, until it finds one where predicate returns true. If such an element is found, find
3445-
* immediately returns that element value. Otherwise, find returns undefined.
3444+
* order, until it finds one where predicate returns true. If such an element is found,
3445+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
34463446
* @param thisArg If provided, it will be used as the this value for each invocation of
34473447
* predicate. If it is not provided, undefined is used instead.
34483448
*/
3449-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
3449+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
34503450

34513451
/**
34523452
* Performs the specified action for each element in an array.
@@ -3715,12 +3715,12 @@ interface Float64Array {
37153715
* Returns the index of the first element in the array where predicate is true, and undefined
37163716
* otherwise.
37173717
* @param predicate find calls predicate once for each element of the array, in ascending
3718-
* order, until it finds one where predicate returns true. If such an element is found, find
3719-
* immediately returns that element value. Otherwise, find returns undefined.
3718+
* order, until it finds one where predicate returns true. If such an element is found,
3719+
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
37203720
* @param thisArg If provided, it will be used as the this value for each invocation of
37213721
* predicate. If it is not provided, undefined is used instead.
37223722
*/
3723-
findIndex(predicate: (value: number) => boolean, thisArg?: any): number | undefined;
3723+
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
37243724

37253725
/**
37263726
* Performs the specified action for each element in an array.

0 commit comments

Comments
 (0)