You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
465
485
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
466
486
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
* Returns the elements of an array that meet the condition specified in a callback function.
474
494
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
475
495
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
476
496
*/
477
-
filter<SextendsT>(
478
-
predicate: (value: T,index: number,array: readonlyT[])=>value is S,
479
-
thisArg?: any
497
+
filter<SextendsT,This=undefined>(
498
+
predicate: (
499
+
this: This,
500
+
value: T,
501
+
index: number,
502
+
array: readonlyT[]
503
+
)=>value is S,
504
+
thisArg?: This
480
505
): S[];
481
506
/**
482
507
* Returns the elements of an array that meet the condition specified in a callback function.
483
508
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
484
509
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
@@ -640,15 +670,15 @@ interface Array<T> {
640
670
* @param deleteCount The number of elements to remove.
641
671
* @returns An array containing the elements that were deleted.
642
672
*/
643
-
splice(start: number,deleteCount?: number): T[];
673
+
splice(start: number,deleteCount?: number): this;
644
674
/**
645
675
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
646
676
* @param start The zero-based location in the array from which to start removing elements.
647
677
* @param deleteCount The number of elements to remove.
648
678
* @param items Elements to insert into the array in place of the deleted elements.
649
679
* @returns An array containing the elements that were deleted.
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
716
746
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
717
747
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
* Returns the elements of an array that meet the condition specified in a callback function.
725
755
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
726
756
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
727
757
*/
728
-
filter<SextendsT>(
729
-
predicate: (value: T,index: number,array: T[])=>value is S,
730
-
thisArg?: any
758
+
filter<SextendsT,This=undefined>(
759
+
predicate: (this: This,value: T,index: number,array: T[])=>value is S,
760
+
thisArg?: This
731
761
): S[];
732
762
/**
733
763
* Returns the elements of an array that meet the condition specified in a callback function.
734
764
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
735
765
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
0 commit comments