Skip to content

StateDefinition

Defined in: types.ts:199

One mode of a StateMachineDefinition.

PropertyTypeDescriptionDefined in
allowedTransitionsstring[]Modes this one can move to. [] makes it final.types.ts:201
invariants?(state) => string | nullChecked before entering this mode: return an error message to reject the transition, or null to allow it.types.ts:207
onEnter?Action[]Run after entering this mode.types.ts:203
onExit?Action[]Run when leaving this mode, before the next mode’s onEnter.types.ts:205