You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS Code is showing type errors for actions (e.g. the type property is being flagged as invalid), guards, and a few other unexpected pieces of the machine.
I'm not great at reading TS errors, but this looks like it's trying to use the context type for validating actions and guards.
Expected result
I expected the code generated by Stately to work without type errors.
XState version
XState version 5
Description
I grabbed the code generated by stately for this machine: https://stately.ai/registry/editor/26c77e49-1ea2-4dcc-b523-a8e185b38fd7?machineId=d1bc8e28-9e9c-4df6-a0f6-25e082e55f9a&mode=Design
VS Code is showing type errors for actions (e.g. the
type
property is being flagged as invalid), guards, and a few other unexpected pieces of the machine.I'm not great at reading TS errors, but this looks like it's trying to use the context type for validating actions and guards.
Expected result
I expected the code generated by Stately to work without type errors.
Actual result
Type inference seems to be a bit weird.
Reproduction
Copy the code from https://stately.ai/registry/editor/26c77e49-1ea2-4dcc-b523-a8e185b38fd7?machineId=d1bc8e28-9e9c-4df6-a0f6-25e082e55f9a&mode=Design into a new project and see the state machine type errors.
Additional context
No response
The text was updated successfully, but these errors were encountered: