Title: Float16Array's definition is incompatible with other typedarrays · Issue #62343 · microsoft/TypeScript · GitHub
Open Graph Title: Float16Array's definition is incompatible with other typedarrays · Issue #62343 · microsoft/TypeScript
X Title: Float16Array's definition is incompatible with other typedarrays · Issue #62343 · microsoft/TypeScript
Description: 🔎 Search Terms Float16Array 🕗 Version & Regression Information Tried 5.9.2 I was unable to test this on prior versions because irrelevant ⏯ Playground Link https://www.typescriptlang.org/play/?target=99#code/KYDwDg9gTgLgBDAnmYcAqzgBMCCUo...
Open Graph Description: 🔎 Search Terms Float16Array 🕗 Version & Regression Information Tried 5.9.2 I was unable to test this on prior versions because irrelevant ⏯ Playground Link https://www.typescriptlang.org/play/?targ...
X Description: 🔎 Search Terms Float16Array 🕗 Version & Regression Information Tried 5.9.2 I was unable to test this on prior versions because irrelevant ⏯ Playground Link https://www.typescriptlang.org/play/?...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/62343
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Float16Array's definition is incompatible with other typedarrays","articleBody":"### 🔎 Search Terms\n\nFloat16Array\n\n### 🕗 Version & Regression Information\n\n- Tried 5.9.2\n- I was unable to test this on prior versions because irrelevant\n\n\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?target=99#code/KYDwDg9gTgLgBDAnmYcAqzgBMCCUoCGiAwhAHYDOMUArgMYzRwC8AUHB3AD5wCSZMABx5CJclVoNo7TjwCqASwHD8RUpWr1GUGR3lKhxADYEAtilyqxGydt3c+AgIwA2EWvGapOzg8XO3K3UJLWlfHn4YAGYAJndrEO97fQFY+OCvO3C4ADEjCAIYV3TPWyYAenK4OghTU2ABBAALBQo4IyVUCBoYABpm1GB8JhqsYDaCAHciOAomiEmlAHNmwtz8wuKg0tCoOFa4Mgh4GvNChQAjI1RFmCa4Y6ah6p3vCmT1gui47Ztdj7yXxcABYSn9vABuVisUCQWAITDoTCWUQsD6RFSiD7+ITxbEGQTGMwWPHZSJbLHZHEUojo1I-SmyOA4tJWAEbIqBRl6T6FVnchyAwog+JQmHgaAnEwUNoYElWABqCmAkwA4g0hoUmABvewEKwAIRoADNjUMAFxweJG01DKG+C6IGDAADypoowBglrINFMFzt0N8NXB2gAFBQFAAvYD8A1O8be33+qAASjgut8vjurQAdPrRDazXtmIcVVbDSai+GozGyHHnRQU-bMxxsxQc47nW7jR74CWAAzNjgAX3sS09SpVAB40HBQM6yFhZcj4gA+UPEbSWuXYMGJbT9H2mACi13qAgoib9QxT2-T9iDnjgADdlZMWKX35voKG23mK7aUD9H+nauu6nqHr6p7AOeMCNkOmYgfG3a9nAADUJaviqHbxgAMg0Sx3AhvhQJ6NBQGQL5vnABCygho6juKcLwMaNBkAwCjkHA44wJOkwznOIALkuSLyqI675kQhYWuWBaVkM-TflA24rr8+7QLe6D3o+GhUWWJZkGWSmhpJiDSamCGkTA5GUVh760egUKjkAA\n\n### 💻 Code\n\n```ts\nexport type TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Uint8ClampedArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float16ArrayConstructor // comment this line out, the error codes away showing that Float16ArrayConstructor is not compatible with other constructors\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nexport type TypedArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Float16Array\n | Float32Array\n | Float64Array;\n\nexport class TypedArrayViewGenerator {\n arrayBuffer: ArrayBuffer;\n byteOffset: number;\n\n constructor(sizeInBytes: number) {\n this.arrayBuffer = new ArrayBuffer(sizeInBytes);\n this.byteOffset = 0;\n }\n getView\u003cT extends TypedArray>(Ctor: TypedArrayConstructor, numElements: number): T {\n // gets an error here because `Float16Array` is not following the\n // the same pattern as the other typed array views\n const view = new Ctor(this.arrayBuffer, this.byteOffset, numElements);\n this.byteOffset += view.byteLength;\n return view as T;\n }\n}\n\nexport function getView\u003cT extends TypedArray>(arrayBuffer: ArrayBuffer, Ctor: TypedArrayConstructor): T {\n // this gets an error too for the same reason\n const view = new Ctor(arrayBuffer);\n return view as T;\n}\n```\n\n\n### 🙁 Actual behavior\n\n`Float16Array` should behave the same as other typed array views like `Float32Array`, `Uint32Array` etc... It's not\n\n### 🙂 Expected behavior\n\n`Float16Array` behaves the same as other typed array views like `Float32Array`, `Uint32Array` etc...\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/greggman","@type":"Person","name":"greggman"},"datePublished":"2025-08-27T20:55:31Z","url":"https://github.com/microsoft/TypeScript/issues/62343"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a9bb8558-bca1-68dd-77e9-dcbad27c4210 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A0C8:37820D:BF6D74:1008CCD:6B00EA0C |
| html-safe-nonce | 1fea1921861a8ebf0715198bacce7875c17ab24d0aa4c8f453445d0a0a713913 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEM4OjM3ODIwRDpCRjZENzQ6MTAwOENDRDo2QjAwRUEwQyIsInZpc2l0b3JfaWQiOiI4NDI2NTMzMDM1NDY1MzA0NTg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9830f6fe571f73ba9e9053a0c0aa8a93d23f23364857616e98e221d85b085e01 |
| hovercard-subject-tag | issue:3360829187 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/62343/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55d4e6747c32012fb13aca78d8c8f0ad81b4a96e575574f0f039ecba69203710/microsoft/TypeScript/issues/62343 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55d4e6747c32012fb13aca78d8c8f0ad81b4a96e575574f0f039ecba69203710/microsoft/TypeScript/issues/62343 |
| og:image:alt | 🔎 Search Terms Float16Array 🕗 Version & Regression Information Tried 5.9.2 I was unable to test this on prior versions because irrelevant ⏯ Playground Link https://www.typescriptlang.org/play/?targ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | greggman |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width