mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Add valueOf declarations for TypedArrays (#36668)
This commit is contained in:
6
src/lib/es2020.bigint.d.ts
vendored
6
src/lib/es2020.bigint.d.ts
vendored
@@ -268,6 +268,9 @@ interface BigInt64Array {
|
||||
/** Returns a string representation of the array. */
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): BigInt64Array;
|
||||
|
||||
/** Yields each value in the array. */
|
||||
values(): IterableIterator<bigint>;
|
||||
|
||||
@@ -537,6 +540,9 @@ interface BigUint64Array {
|
||||
/** Returns a string representation of the array. */
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): BigUint64Array;
|
||||
|
||||
/** Yields each value in the array. */
|
||||
values(): IterableIterator<bigint>;
|
||||
|
||||
|
||||
27
src/lib/es5.d.ts
vendored
27
src/lib/es5.d.ts
vendored
@@ -1920,6 +1920,9 @@ interface Int8Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Int8Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
interface Int8ArrayConstructor {
|
||||
@@ -2199,6 +2202,9 @@ interface Uint8Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Uint8Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -2478,6 +2484,9 @@ interface Uint8ClampedArray {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Uint8ClampedArray;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -2755,6 +2764,9 @@ interface Int16Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Int16Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -3035,6 +3047,9 @@ interface Uint16Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Uint16Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -3314,6 +3329,9 @@ interface Int32Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Int32Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -3592,6 +3610,9 @@ interface Uint32Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Uint32Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -3871,6 +3892,9 @@ interface Float32Array {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Float32Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
@@ -4142,6 +4166,9 @@ interface Float64Array {
|
||||
|
||||
toString(): string;
|
||||
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Float64Array;
|
||||
|
||||
[index: number]: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user