Skip to content

WriteStateInstance

Reports the current state of an Item together with the transitions that can be executed from it.

TWriteItem extends WriteItem = WriteItem

The Item type returned by a transition.

TState extends string | null = string | null

The state keys of the Template.

TTransitionTypes extends object = {[transition: string]: any; }

The transition keys available from the current state.

readonly transitions: Record<keyof TTransitionTypes, WriteTransitionInstance<TWriteItem>>

Transitions leaving the current state, keyed by transition key; only these can be executed on the Item.


readonly value: TState

The key of the current state.

ReadStateInstance.value