Add missing Float16Array constructors (#62351)

This commit is contained in:
Greggman 2025-09-09 11:22:55 -07:00 committed by GitHub
parent 4f94cb2aa4
commit 3320dfdfcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -356,6 +356,8 @@ interface Float16ArrayConstructor {
new (length?: number): Float16Array<ArrayBuffer>;
new (array: ArrayLike<number> | Iterable<number>): Float16Array<ArrayBuffer>;
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array<TArrayBuffer>;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array<ArrayBuffer>;
new (array: ArrayLike<number> | ArrayBuffer): Float16Array<ArrayBuffer>;
/**
* The size in bytes of each element in the array.

View File

@ -12,6 +12,7 @@ type TypedArrayConstructor =
| Uint16ArrayConstructor
| Int32ArrayConstructor
| Uint32ArrayConstructor
| Float16ArrayConstructor
| Float32ArrayConstructor
| Float64ArrayConstructor
| BigInt64ArrayConstructor