Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update typescript to 5.4 #2385

Merged
merged 2 commits into from
Mar 22, 2024
Merged

update typescript to 5.4 #2385

merged 2 commits into from
Mar 22, 2024

Conversation

tim-smart
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Mar 22, 2024

🦋 Changeset detected

Latest commit: 0e1decd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@effect/schema Patch
@effect/cli Patch
effect Patch
@effect/experimental Patch
@effect/opentelemetry Patch
@effect/platform Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node Patch
@effect/platform-node-shared Patch
@effect/printer Patch
@effect/printer-ansi Patch
@effect/rpc Patch
@effect/rpc-http 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

@tim-smart tim-smart changed the title update typescripts to 5.4 update typescript to 5.4 Mar 22, 2024
@tim-smart
Copy link
Member Author

@gcanti Looks like there is an issue with Schema.tuple

@gcanti
Copy link
Contributor

gcanti commented Mar 22, 2024

@tim-smart wow... it seems that there has been a significant change in the behavior of the built-in type Required when it comes to tuples

from

// ts 5.3
type A = readonly [string, ...number[], boolean]
type B = Required<A> // readonly [string, ...(number | boolean)[], number | boolean]

to

// ts 5.4
type A = readonly [string, ...number[], boolean]
type B = Required<A> // readonly [string, ...number[], boolean]

@tim-smart
Copy link
Member Author

The typescript 5.3 behaviour seems strange, unless I'm missing something.

@gcanti
Copy link
Contributor

gcanti commented Mar 22, 2024

The 5.4 behaviour seems definitely more correct, probably a bugfix, all previous versions behaved differently, and I had to implement the "wrong" behaviour to keep runtime and type-level aligned. I think we should change the runtime to align with version 5.4

@tim-smart tim-smart requested a review from gcanti as a code owner March 22, 2024 07:12
@tim-smart
Copy link
Member Author

This will mean mis-alignment for previous typescript versions? I wonder if this should be in the next minor release.

@gcanti
Copy link
Contributor

gcanti commented Mar 22, 2024

yes, but in any case, we have a mis-alignment, either with the previous versions or with version 5.4. However, the behaviour of version 5.4 is the "correct" one, so I would prioritize it and treat it as a bugfix

@tim-smart tim-smart merged commit 3307729 into main Mar 22, 2024
12 checks passed
@tim-smart tim-smart deleted the update-ts branch March 22, 2024 07:34
@github-actions github-actions bot mentioned this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants