Function: validateStateExists()
Documentation / @xmachines/play-router / validateStateExists
function validateStateExists(stateId, stateMap): void;Defined in: validate-routes.ts:32
Validate state exists in state map
Ensures referenced state IDs exist in the machine graph. Build-time validation prevents broken route references.
Parameters
| Parameter | Type | Description |
|---|---|---|
stateId | string | State identifier to validate |
stateMap | Map<string, StateNode<MachineContext, EventObject>> | Map of all state IDs to StateNodes |
Returns
void
Throws
If state ID doesn’t exist in map