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
Implement "strict": True as an option in the machine configuration to allow a throw on a non-defined event for a given node. As it's a bit tricky to implement this external to the machine at present, e.g.:
# Doesn't thrownew_state=machine.transition(state=current_state, event="💩")
# Example of current check you'd have to doifnew_state.value==current_state.value:
print("Didn't transition, maybe was an illegal state 🤷")
Implement
"strict": True
as an option in the machine configuration to allow a throw on a non-defined event for a given node. As it's a bit tricky to implement this external to the machine at present, e.g.:Similar to the implementation in the TS version of
xstate
https://github.com/statelyai/xstate/blob/8b7c3e2573341c5ed91057aab77e1977f8de8555/packages/core/src/StateNode.ts#L1095Happy to take a crack at this if you think its worthwhile.
The text was updated successfully, but these errors were encountered: