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

Bug: [@xstate/store] typings broken #4859

Closed
wcastand opened this issue Apr 18, 2024 · 2 comments
Closed

Bug: [@xstate/store] typings broken #4859

wcastand opened this issue Apr 18, 2024 · 2 comments
Labels

Comments

@wcastand
Copy link

XState version

XState version 5

Description

the transition event is broken when i pass a type to create.

because i try to access event: { newContext } but types expect update to possibly also be {type: update} which breaks the types.

Couldn't find an example in your repo on typing stores so maybe i'm doing it wrong.

Expected result

type to not show an error

Actual result

showing a type error when passing the update fn

Reproduction

https://replit.com/join/ifbbvxzfvf-wcastand

Additional context

No response

@wcastand wcastand added the bug label Apr 18, 2024
@davidkpiano
Copy link
Member

Can you try with the latest version?

@wcastand
Copy link
Author

looks fixed, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants