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

Fixed types compatibility with TS 5.0 #4728

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Feb 5, 2024

No description provided.

Copy link

changeset-bot bot commented Feb 5, 2024

🦋 Changeset detected

Latest commit: 0d005f2

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

This PR includes changesets to release 1 package
Name Type
xstate 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

@Andarist Andarist requested a review from davidkpiano February 5, 2024 12:31
Copy link

codesandbox-ci bot commented Feb 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0d005f2:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

}[undefined extends TActor['id'] // if not all actors have literal string IDs then we need to create an index signature containing all possible actor types
? 'include'
: string extends TActor['id']
: Compute<
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just brings back Compute here so it's essentially a revert of this change https://github.com/statelyai/xstate/pull/4706/files#r1467593357

@@ -61,7 +61,7 @@ type ToProvidedActor<
id: IsNever<TChildrenMap> extends true
? string | undefined
: K extends keyof Invert<TChildrenMap>
? Invert<TChildrenMap>[K]
? Invert<TChildrenMap>[K] & string
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the true and correct fix for what I previously fixed by removing Compute. You can read my breakdown of the issue here

@Andarist Andarist merged commit 659efd5 into main Feb 5, 2024
2 checks passed
@Andarist Andarist deleted the fix/compat-with-ts-50 branch February 5, 2024 15:36
@github-actions github-actions bot mentioned this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants