Fix the type of copyWithin (#53340)

This commit is contained in:
Eric Ferreira
2023-03-22 13:54:49 -04:00
committed by GitHub
parent 9f18c3fd9c
commit a82b9274b5
7 changed files with 34 additions and 34 deletions

View File

@@ -38,10 +38,10 @@ interface Array<T> {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
}
interface ArrayConstructor {

View File

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

36
src/lib/es5.d.ts vendored
View File

@@ -1849,10 +1849,10 @@ interface Int8Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -2131,10 +2131,10 @@ interface Uint8Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -2413,10 +2413,10 @@ interface Uint8ClampedArray {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -2694,10 +2694,10 @@ interface Int16Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -2976,10 +2976,10 @@ interface Uint16Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -3258,10 +3258,10 @@ interface Int32Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -3540,10 +3540,10 @@ interface Uint32Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -3821,10 +3821,10 @@ interface Float32Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@@ -4104,10 +4104,10 @@ interface Float64Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* is treated as length+end. If start is omitted, `0` is used.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
copyWithin(target: number, start?: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.