Skip to content

Commit a82b927

Browse files
authored
Fix the type of copyWithin (#53340)
1 parent 9f18c3f commit a82b927

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.
41+
* is treated as length+end. If start is omitted, `0` is used.
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.
150+
* is treated as length+end. If start is omitted, `0` is used.
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.
422+
* is treated as length+end. If start is omitted, `0` is used.
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
@@ -1849,10 +1849,10 @@ interface Int8Array {
18491849
* @param target If target is negative, it is treated as length+target where length is the
18501850
* length of the array.
18511851
* @param start If start is negative, it is treated as length+start. If end is negative, it
1852-
* is treated as length+end.
1852+
* is treated as length+end. If start is omitted, `0` is used.
18531853
* @param end If not specified, length of the this object is used as its default value.
18541854
*/
1855-
copyWithin(target: number, start: number, end?: number): this;
1855+
copyWithin(target: number, start?: number, end?: number): this;
18561856

18571857
/**
18581858
* Determines whether all the members of an array satisfy the specified test.
@@ -2131,10 +2131,10 @@ interface Uint8Array {
21312131
* @param target If target is negative, it is treated as length+target where length is the
21322132
* length of the array.
21332133
* @param start If start is negative, it is treated as length+start. If end is negative, it
2134-
* is treated as length+end.
2134+
* is treated as length+end. If start is omitted, `0` is used.
21352135
* @param end If not specified, length of the this object is used as its default value.
21362136
*/
2137-
copyWithin(target: number, start: number, end?: number): this;
2137+
copyWithin(target: number, start?: number, end?: number): this;
21382138

21392139
/**
21402140
* Determines whether all the members of an array satisfy the specified test.
@@ -2413,10 +2413,10 @@ interface Uint8ClampedArray {
24132413
* @param target If target is negative, it is treated as length+target where length is the
24142414
* length of the array.
24152415
* @param start If start is negative, it is treated as length+start. If end is negative, it
2416-
* is treated as length+end.
2416+
* is treated as length+end. If start is omitted, `0` is used.
24172417
* @param end If not specified, length of the this object is used as its default value.
24182418
*/
2419-
copyWithin(target: number, start: number, end?: number): this;
2419+
copyWithin(target: number, start?: number, end?: number): this;
24202420

24212421
/**
24222422
* Determines whether all the members of an array satisfy the specified test.
@@ -2694,10 +2694,10 @@ interface Int16Array {
26942694
* @param target If target is negative, it is treated as length+target where length is the
26952695
* length of the array.
26962696
* @param start If start is negative, it is treated as length+start. If end is negative, it
2697-
* is treated as length+end.
2697+
* is treated as length+end. If start is omitted, `0` is used.
26982698
* @param end If not specified, length of the this object is used as its default value.
26992699
*/
2700-
copyWithin(target: number, start: number, end?: number): this;
2700+
copyWithin(target: number, start?: number, end?: number): this;
27012701

27022702
/**
27032703
* Determines whether all the members of an array satisfy the specified test.
@@ -2976,10 +2976,10 @@ interface Uint16Array {
29762976
* @param target If target is negative, it is treated as length+target where length is the
29772977
* length of the array.
29782978
* @param start If start is negative, it is treated as length+start. If end is negative, it
2979-
* is treated as length+end.
2979+
* is treated as length+end. If start is omitted, `0` is used.
29802980
* @param end If not specified, length of the this object is used as its default value.
29812981
*/
2982-
copyWithin(target: number, start: number, end?: number): this;
2982+
copyWithin(target: number, start?: number, end?: number): this;
29832983

29842984
/**
29852985
* Determines whether all the members of an array satisfy the specified test.
@@ -3258,10 +3258,10 @@ interface Int32Array {
32583258
* @param target If target is negative, it is treated as length+target where length is the
32593259
* length of the array.
32603260
* @param start If start is negative, it is treated as length+start. If end is negative, it
3261-
* is treated as length+end.
3261+
* is treated as length+end. If start is omitted, `0` is used.
32623262
* @param end If not specified, length of the this object is used as its default value.
32633263
*/
3264-
copyWithin(target: number, start: number, end?: number): this;
3264+
copyWithin(target: number, start?: number, end?: number): this;
32653265

32663266
/**
32673267
* Determines whether all the members of an array satisfy the specified test.
@@ -3540,10 +3540,10 @@ interface Uint32Array {
35403540
* @param target If target is negative, it is treated as length+target where length is the
35413541
* length of the array.
35423542
* @param start If start is negative, it is treated as length+start. If end is negative, it
3543-
* is treated as length+end.
3543+
* is treated as length+end. If start is omitted, `0` is used.
35443544
* @param end If not specified, length of the this object is used as its default value.
35453545
*/
3546-
copyWithin(target: number, start: number, end?: number): this;
3546+
copyWithin(target: number, start?: number, end?: number): this;
35473547

35483548
/**
35493549
* Determines whether all the members of an array satisfy the specified test.
@@ -3821,10 +3821,10 @@ interface Float32Array {
38213821
* @param target If target is negative, it is treated as length+target where length is the
38223822
* length of the array.
38233823
* @param start If start is negative, it is treated as length+start. If end is negative, it
3824-
* is treated as length+end.
3824+
* is treated as length+end. If start is omitted, `0` is used.
38253825
* @param end If not specified, length of the this object is used as its default value.
38263826
*/
3827-
copyWithin(target: number, start: number, end?: number): this;
3827+
copyWithin(target: number, start?: number, end?: number): this;
38283828

38293829
/**
38303830
* Determines whether all the members of an array satisfy the specified test.
@@ -4104,10 +4104,10 @@ interface Float64Array {
41044104
* @param target If target is negative, it is treated as length+target where length is the
41054105
* length of the array.
41064106
* @param start If start is negative, it is treated as length+start. If end is negative, it
4107-
* is treated as length+end.
4107+
* is treated as length+end. If start is omitted, `0` is used.
41084108
* @param end If not specified, length of the this object is used as its default value.
41094109
*/
4110-
copyWithin(target: number, start: number, end?: number): this;
4110+
copyWithin(target: number, start?: number, end?: number): this;
41114111

41124112
/**
41134113
* Determines whether all the members of an array satisfy the specified test.

0 commit comments

Comments
 (0)