Metakit / @doeixd/metakit/machine
phaseTable
function · packages/metakit/src/machinePhaseGraph.ts:211
function phaseTable<
State,
Transitions extends Readonly<Record<string, unknown>>,
>(
machine: Machine<State, Transitions>,
options?: Expr.ReaderOptions,
): PhaseTable<
State,
PhaseNameOf<Transitions> & string,
keyof Transitions & string
>For each phase of machine, which messages move it and where, and which
are refused: each guard is judged knowing only the phase, so a message
whose guard reads more of the state may be taken and is listed with every
phase it may lead to. options holds custom operation implementations.