Skip to main content

StateClass

StateClass<Context, Protocol> = Function & object

Constructor type for a state class participating in the hierarchy.

Satisfied by any Function whose prototype derives from TopState. Used wherever the runtime expects a state class, not an instance: makeHsm, State.transition, InitialState, Hsm.restore.

Type Declaration

prototype

prototype: TopState<Context, Protocol>

Type Parameters

Context

Context = Any

Domain context carried by the machine

Protocol

Protocol extends { } | undefined = undefined

Event/service vocabulary