Signature: {
    context?: Definition.Context.Signature;
    initial: Tagged<string, "StateValue">;
    on?: Definition.On.Signature;
    states: {
        [stateValue: Tagged<string, "StateValue">]: Definition.State.Signature;
    };
}

Type declaration

  • Optional Readonlycontext?: Definition.Context.Signature

    The context of the state machine.

  • Readonlyinitial: Tagged<string, "StateValue">

    The initial state value.

  • Optional Readonlyon?: Definition.On.Signature

    The definition how a state machine will transition when it receives a specific event.

  • Readonlystates: {
        [stateValue: Tagged<string, "StateValue">]: Definition.State.Signature;
    }

    The state definitions.