This is the interface for the state. The interface takes in a few generic parameters:
You can probably get by extending the TemplateState class.
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"
A state's all possible states can be only a subset of the possible states of the state machine. (a state only needs to know what states it can transition to)
This allows for a state to be reusable across different state machines.
This is the interface for the state. The interface takes in a few generic parameters: You can probably get by extending the TemplateState class.
Generic parameters:
A state's all possible states can be only a subset of the possible states of the state machine. (a state only needs to know what states it can transition to) This allows for a state to be reusable across different state machines.
See
TemplateState