How to type guards so that their event
& { cond }
arguments contain the correct props?
#2116
Answered
by
Andarist
lsps9150414
asked this question in
Q&A
-
I have a Inside an
|
Beta Was this translation helpful? Give feedback.
Answered by
Andarist
Apr 18, 2021
Replies: 1 comment 1 reply
-
For now, you need to assert the type in your guard's implementation. We are thinking about how to make this better with an additional tool that would aid the development. The current attempts at this can be found here: https://github.com/mattpocock/xstate-codegen but this doesn't cover your use case yet. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lsps9150414
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For now, you need to assert the type in your guard's implementation. We are thinking about how to make this better with an additional tool that would aid the development. The current attempts at this can be found here: https://github.com/mattpocock/xstate-codegen but this doesn't cover your use case yet.