Type Alias State<D, V>

State<D, V>: {
    context: Context<D>;
    event: TransitionEventForStateValue<D, V>;
    nextEvents: readonly NextEventTypesForStateValue<D, V>[];
    value: V;
}

The current state of the state machine.

Type Parameters

  • D

    The type of definition for state machine.

  • V = keyof Get<D, ["states"]>

    The type of state value.

Type declaration