-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Type inference for initial #310
Comments
Until the machine config is inside the This should solve your issue: const Chart: MachineConfig<Context, Schema, Event> = {
id: 'controller',
initial: 'stopped',
// ...
} |
Reopening this so I can add it to the docs. |
Hey @davidkpiano , I'm having the same issues like @dakom but in my case with child states. I've tried your solution using |
@ccontreras could u prepare a repro case? |
Closing this for now. @ccontreras Please try with |
Bug or feature request?
Bug
Description:
Typescript doesn't know that initial value is fine
(Bug) Expected result:
Types should pass
(Bug) Actual result:
(Bug) Potential fix:
Temporary Workaround in the following example is to change:
to:
Not sure how to fix it at the source
Link to reproduction or proof-of-concept:
Cloned the repo locally, built, and npm-linked. Then did the following:
The text was updated successfully, but these errors were encountered: