[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/orm](../../README) / [index](../README) / TransitionResult

# Type Alias: TransitionResult

> **TransitionResult** = \[`true`\] \| \[`false`, [`StateError`](../classes/StateError)\]

Defined in: [packages/orm/src/model/State.ts:68](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/orm/src/model/State.ts#L68)

Result of State.transitionTo: `[true]` on success, or `[false, StateError]` when the
transition is illegal or a guard blocks it. Destructure and check — TypeScript narrows the
error to `StateError` in the `!ok` branch:

  const [ok, err] = await order.transitionTo("shipped");
  if (!ok) return json({ error: err.message }, 422);
