Factory function returned by FsmEngine.define.
The returned function creates independent FSM instances that share the same definition and type parameters.
If Context is void, the factory may be called with no argument or with { label?: string }.
Context
void
{ label?: string }
Otherwise, the factory requires { context: Context }, with optional { label?: string }.
{ context: Context }
The optional label is used in trace output to help distinguish instances created from the same definition.
label
Factory function returned by FsmEngine.define.
The returned function creates independent FSM instances that share the same definition and type parameters.
If
Contextisvoid, the factory may be called with no argument or with{ label?: string }.Otherwise, the factory requires
{ context: Context }, with optional{ label?: string }.The optional
labelis used in trace output to help distinguish instances created from the same definition.