Skip to content

Commit 71c56c2

Browse files
authored
Fix the type of Array.copyWithin #54967 (#55012)
1 parent 6a96b97 commit 71c56c2

7 files changed

+34
-34
lines changed

src/lib/es2015.core.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ interface Array<T> {
3838
* @param target If target is negative, it is treated as length+target where length is the
3939
* length of the array.
4040
* @param start If start is negative, it is treated as length+start. If end is negative, it
41-
* is treated as length+end. If start is omitted, `0` is used.
41+
* is treated as length+end.
4242
* @param end If not specified, length of the this object is used as its default value.
4343
*/
44-
copyWithin(target: number, start?: number, end?: number): this;
44+
copyWithin(target: number, start: number, end?: number): this;
4545
}
4646

4747
interface ArrayConstructor {

src/lib/es2020.bigint.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ interface BigInt64Array {
147147
* @param target If target is negative, it is treated as length+target where length is the
148148
* length of the array.
149149
* @param start If start is negative, it is treated as length+start. If end is negative, it
150-
* is treated as length+end. If start is omitted, `0` is used.
150+
* is treated as length+end.
151151
* @param end If not specified, length of the this object is used as its default value.
152152
*/
153-
copyWithin(target: number, start?: number, end?: number): this;
153+
copyWithin(target: number, start: number, end?: number): this;
154154

155155
/** Yields index, value pairs for every entry in the array. */
156156
entries(): IterableIterator<[number, bigint]>;
@@ -419,10 +419,10 @@ interface BigUint64Array {
419419
* @param target If target is negative, it is treated as length+target where length is the
420420
* length of the array.
421421
* @param start If start is negative, it is treated as length+start. If end is negative, it
422-
* is treated as length+end. If start is omitted, `0` is used.
422+
* is treated as length+end.
423423
* @param end If not specified, length of the this object is used as its default value.
424424
*/
425-
copyWithin(target: number, start?: number, end?: number): this;
425+
copyWithin(target: number, start: number, end?: number): this;
426426

427427
/** Yields index, value pairs for every entry in the array. */
428428
entries(): IterableIterator<[number, bigint]>;

src/lib/es5.d.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,10 +1871,10 @@ interface Int8Array {
18711871
* @param target If target is negative, it is treated as length+target where length is the
18721872
* length of the array.
18731873
* @param start If start is negative, it is treated as length+start. If end is negative, it
1874-
* is treated as length+end. If start is omitted, `0` is used.
1874+
* is treated as length+end.
18751875
* @param end If not specified, length of the this object is used as its default value.
18761876
*/
1877-
copyWithin(target: number, start?: number, end?: number): this;
1877+
copyWithin(target: number, start: number, end?: number): this;
18781878

18791879
/**
18801880
* Determines whether all the members of an array satisfy the specified test.
@@ -2153,10 +2153,10 @@ interface Uint8Array {
21532153
* @param target If target is negative, it is treated as length+target where length is the
21542154
* length of the array.
21552155
* @param start If start is negative, it is treated as length+start. If end is negative, it
2156-
* is treated as length+end. If start is omitted, `0` is used.
2156+
* is treated as length+end.
21572157
* @param end If not specified, length of the this object is used as its default value.
21582158
*/
2159-
copyWithin(target: number, start?: number, end?: number): this;
2159+
copyWithin(target: number, start: number, end?: number): this;
21602160

21612161
/**
21622162
* Determines whether all the members of an array satisfy the specified test.
@@ -2435,10 +2435,10 @@ interface Uint8ClampedArray {
24352435
* @param target If target is negative, it is treated as length+target where length is the
24362436
* length of the array.
24372437
* @param start If start is negative, it is treated as length+start. If end is negative, it
2438-
* is treated as length+end. If start is omitted, `0` is used.
2438+
* is treated as length+end.
24392439
* @param end If not specified, length of the this object is used as its default value.
24402440
*/
2441-
copyWithin(target: number, start?: number, end?: number): this;
2441+
copyWithin(target: number, start: number, end?: number): this;
24422442

24432443
/**
24442444
* Determines whether all the members of an array satisfy the specified test.
@@ -2716,10 +2716,10 @@ interface Int16Array {
27162716
* @param target If target is negative, it is treated as length+target where length is the
27172717
* length of the array.
27182718
* @param start If start is negative, it is treated as length+start. If end is negative, it
2719-
* is treated as length+end. If start is omitted, `0` is used.
2719+
* is treated as length+end.
27202720
* @param end If not specified, length of the this object is used as its default value.
27212721
*/
2722-
copyWithin(target: number, start?: number, end?: number): this;
2722+
copyWithin(target: number, start: number, end?: number): this;
27232723

27242724
/**
27252725
* Determines whether all the members of an array satisfy the specified test.
@@ -2998,10 +2998,10 @@ interface Uint16Array {
29982998
* @param target If target is negative, it is treated as length+target where length is the
29992999
* length of the array.
30003000
* @param start If start is negative, it is treated as length+start. If end is negative, it
3001-
* is treated as length+end. If start is omitted, `0` is used.
3001+
* is treated as length+end.
30023002
* @param end If not specified, length of the this object is used as its default value.
30033003
*/
3004-
copyWithin(target: number, start?: number, end?: number): this;
3004+
copyWithin(target: number, start: number, end?: number): this;
30053005

30063006
/**
30073007
* Determines whether all the members of an array satisfy the specified test.
@@ -3280,10 +3280,10 @@ interface Int32Array {
32803280
* @param target If target is negative, it is treated as length+target where length is the
32813281
* length of the array.
32823282
* @param start If start is negative, it is treated as length+start. If end is negative, it
3283-
* is treated as length+end. If start is omitted, `0` is used.
3283+
* is treated as length+end.
32843284
* @param end If not specified, length of the this object is used as its default value.
32853285
*/
3286-
copyWithin(target: number, start?: number, end?: number): this;
3286+
copyWithin(target: number, start: number, end?: number): this;
32873287

32883288
/**
32893289
* Determines whether all the members of an array satisfy the specified test.
@@ -3562,10 +3562,10 @@ interface Uint32Array {
35623562
* @param target If target is negative, it is treated as length+target where length is the
35633563
* length of the array.
35643564
* @param start If start is negative, it is treated as length+start. If end is negative, it
3565-
* is treated as length+end. If start is omitted, `0` is used.
3565+
* is treated as length+end.
35663566
* @param end If not specified, length of the this object is used as its default value.
35673567
*/
3568-
copyWithin(target: number, start?: number, end?: number): this;
3568+
copyWithin(target: number, start: number, end?: number): this;
35693569

35703570
/**
35713571
* Determines whether all the members of an array satisfy the specified test.
@@ -3843,10 +3843,10 @@ interface Float32Array {
38433843
* @param target If target is negative, it is treated as length+target where length is the
38443844
* length of the array.
38453845
* @param start If start is negative, it is treated as length+start. If end is negative, it
3846-
* is treated as length+end. If start is omitted, `0` is used.
3846+
* is treated as length+end.
38473847
* @param end If not specified, length of the this object is used as its default value.
38483848
*/
3849-
copyWithin(target: number, start?: number, end?: number): this;
3849+
copyWithin(target: number, start: number, end?: number): this;
38503850

38513851
/**
38523852
* Determines whether all the members of an array satisfy the specified test.
@@ -4126,10 +4126,10 @@ interface Float64Array {
41264126
* @param target If target is negative, it is treated as length+target where length is the
41274127
* length of the array.
41284128
* @param start If start is negative, it is treated as length+start. If end is negative, it
4129-
* is treated as length+end. If start is omitted, `0` is used.
4129+
* is treated as length+end.
41304130
* @param end If not specified, length of the this object is used as its default value.
41314131
*/
4132-
copyWithin(target: number, start?: number, end?: number): this;
4132+
copyWithin(target: number, start: number, end?: number): this;
41334133

41344134
/**
41354135
* Determines whether all the members of an array satisfy the specified test.

0 commit comments

Comments
 (0)