Function: validateStateExists()
API / @xmachines/play-router / validateStateExists
function validateStateExists(stateId, stateIds): void;Defined in: validate-routes.ts:31
Validate state exists in state ID set
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 |
stateIds | Set<string> | Set of all known state IDs from the machine graph |
Returns
void
Throws
If state ID doesn’t exist in set