This is the interface for the state machine. The interface takes in a few generic parameters.
Generic parameters:
EventPayloadMapping: A mapping of events to their payloads.
Context: The context of the state machine. (which can be used by each state to do calculations that would persist across states)
States: All of the possible states that the state machine can be in. e.g. a string literal union like "IDLE" | "SELECTING" | "PAN" | "ZOOM"
You can probably get by using the TemplateStateMachine class.
The naming is that an event would "happen" and the state of the state machine would "handle" it.
This is the interface for the state machine. The interface takes in a few generic parameters.
Generic parameters:
You can probably get by using the TemplateStateMachine class. The naming is that an event would "happen" and the state of the state machine would "handle" it.
See