Replies: 1 comment 3 replies
-
When using |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey I have a use case where I have created a type to define all my
guards
andactions
but I don't know whatstate machine
is implemented at build time (I plan to have a API call which fetches this data).Currently the guards and actions in the setup function are configured to be optional so I can't statically determine if all my guards and actions have been implemented before calling
createMachine
The following is an example of what I'm striving for.
I do know that when I call createMachine and reference a action or guard which is undefined it will throw a typescript error but in my case I won't know everything in the createMachine call until runtime. Therefore I'm trying to find a way to statically type this during setup.
Beta Was this translation helpful? Give feedback.
All reactions