Skip to content

Fixes to support building under TypeScript 5.9#4834

Open
rbuckton wants to merge 3 commits into
Effect-TS:v3from
rbuckton:pre-ts5.9
Open

Fixes to support building under TypeScript 5.9#4834
rbuckton wants to merge 3 commits into
Effect-TS:v3from
rbuckton:pre-ts5.9

Conversation

@rbuckton

@rbuckton rbuckton commented May 7, 2025

Copy link
Copy Markdown

Type

  • Refactor
  • Feature
  • 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 microsoft/TypeScript#61647.

Related

microsoft/TypeScript#61647 (comment)

@github-project-automation github-project-automation Bot moved this to Discussion Ongoing in PR Backlog May 7, 2025
@changeset-bot

changeset-bot Bot commented May 7, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d427dcc

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

@mikearnaldi

Copy link
Copy Markdown
Member

Type

  • Refactor
  • Feature
  • 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 microsoft/TypeScript#61647.

Related

microsoft/TypeScript#61647 (comment)

Thanks for the PR!

@sambacha

Copy link
Copy Markdown

I am running into this issue regarding HttpIncomingMessage

@fubhy

fubhy commented Jul 9, 2026

Copy link
Copy Markdown
Member

This no longer applies cleanly to main. Could you rebase/update the PR and confirm which TypeScript 5.9 issues still reproduce? The underlying fix still looks potentially relevant, but it needs a refresh before maintainers can review it.

@IMax153
IMax153 changed the base branch from main to v3 July 13, 2026 23:56
@IMax153 IMax153 added the 3.0 Used for issues, pull requests, etc. that are relevant for the `v3` branch targeting Effect v3. label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0 Used for issues, pull requests, etc. that are relevant for the `v3` branch targeting Effect v3.

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

5 participants