Fixes to support building under TypeScript 5.9
Type
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
This fixes compile-time errors discovered when running tests for updated DOM types in TypeScript 5.9. This also addresses compile-time errors resulting from a change in TypeScript 5.8 where the global ArrayBuffer type is now distinct from SharedArrayBuffer and various typed arrays.
The changes herein are primarily internal casts to a more concrete type. Avoiding the casts would require more extensive changes to effect that I would rather leave up to the maintainers. The only non-cast change is to address a bug in HttpIncomingMessage which declares an arrayBuffer property that returns an effect for ArrayBuffer, but was actually returning an effect for a Uint8Array.
Some of the underlying errors can be seen by upgrading the version of typescript in the repository's package.json. Errors related to invalid casts to an IDBValidKey require the updated DOM types from https://github.com/microsoft/TypeScript/pull/61647.
Related
https://github.com/microsoft/TypeScript/pull/61647#issuecomment-2852617744
🦋 Changeset detected
Latest commit: d427dcc2aafec54d2a2236895bdccd0e719ad70e
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 32 packages
| Name | Type |
|---|---|
| @effect/platform-browser | Patch |
| @effect/platform-node | Patch |
| @effect/experimental | Patch |
| effect | Patch |
| @effect/cli | Patch |
| @effect/cluster | Patch |
| @effect/sql-clickhouse | Patch |
| @effect/sql-drizzle | Patch |
| @effect/sql-mssql | Patch |
| @effect/sql-sqlite-node | Patch |
| @effect/ai-anthropic | Patch |
| @effect/ai-openai | Patch |
| @effect/sql-d1 | Patch |
| @effect/sql-libsql | Patch |
| @effect/sql-mysql2 | Patch |
| @effect/sql-pg | Patch |
| @effect/sql-sqlite-bun | Patch |
| @effect/sql-sqlite-do | Patch |
| @effect/sql-sqlite-react-native | Patch |
| @effect/sql-sqlite-wasm | Patch |
| @effect/sql | Patch |
| @effect/ai | Patch |
| @effect/opentelemetry | Patch |
| @effect/platform-bun | Patch |
| @effect/platform-node-shared | Patch |
| @effect/platform | Patch |
| @effect/printer-ansi | Patch |
| @effect/printer | Patch |
| @effect/rpc | Patch |
| @effect/sql-kysely | Patch |
| @effect/typeclass | Patch |
| @effect/vitest | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Type
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
This fixes compile-time errors discovered when running tests for updated DOM types in TypeScript 5.9. This also addresses compile-time errors resulting from a change in TypeScript 5.8 where the global
ArrayBuffertype is now distinct fromSharedArrayBufferand various typed arrays.The changes herein are primarily internal casts to a more concrete type. Avoiding the casts would require more extensive changes to effect that I would rather leave up to the maintainers. The only non-cast change is to address a bug in
HttpIncomingMessagewhich declares anarrayBufferproperty that returns an effect forArrayBuffer, but was actually returning an effect for aUint8Array.Some of the underlying errors can be seen by upgrading the version of
typescriptin the repository'spackage.json. Errors related to invalid casts to anIDBValidKeyrequire the updated DOM types from microsoft/TypeScript#61647.Related
Thanks for the PR!
I am running into this issue regarding HttpIncomingMessage