Skip to content

decide

decide(state, command, ctx): Decision

Defined in: packages/core/src/engine/decide.ts:46

The pure engine: computes the next request state, audit events and domain events for one command. No I/O, no clock, no randomness: the same state, command and context always give the same result. Throws a RungsError when the command is not allowed; the input is never changed.

RequestState | null

Command

EngineContext

Decision