StateDefinition
Defined in: types.ts:199
One mode of a StateMachineDefinition.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
allowedTransitions | string[] | Modes this one can move to. [] makes it final. | types.ts:201 |
invariants? | (state) => string | null | Checked 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 |