From 3320dfdfcf17cdcdbfccb8040ea73cf110d94ba3 Mon Sep 17 00:00:00 2001 From: Greggman Date: Tue, 9 Sep 2025 11:22:55 -0700 Subject: [PATCH] Add missing Float16Array constructors (#62351) --- src/lib/esnext.float16.d.ts | 2 ++ tests/cases/compiler/typedArrayConstructorOverloads.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/lib/esnext.float16.d.ts b/src/lib/esnext.float16.d.ts index 88b12f67536..6a1f600040d 100644 --- a/src/lib/esnext.float16.d.ts +++ b/src/lib/esnext.float16.d.ts @@ -356,6 +356,8 @@ interface Float16ArrayConstructor { new (length?: number): Float16Array; new (array: ArrayLike | Iterable): Float16Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array; + new (array: ArrayLike | ArrayBuffer): Float16Array; /** * The size in bytes of each element in the array. diff --git a/tests/cases/compiler/typedArrayConstructorOverloads.ts b/tests/cases/compiler/typedArrayConstructorOverloads.ts index c532545d39d..63fbfb07a9d 100644 --- a/tests/cases/compiler/typedArrayConstructorOverloads.ts +++ b/tests/cases/compiler/typedArrayConstructorOverloads.ts @@ -12,6 +12,7 @@ type TypedArrayConstructor = | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor + | Float16ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor