HandlerDef
HandlerDef<
TCtx,TStateNames> =TStateNames|HandlerFn<TCtx,TStateNames> |MachinaInstance
Defined in: types.ts:258
The union of valid handler definition forms for a state input.
TStateNames— string shorthand, auto-transitions to that stateHandlerFn— function that returns a state name (transition) or void (stay)MachinaInstance— included to satisfy TypeScript’s structural widening whenValidateStatesfalls back to its constraint type. The per-key restriction on_childis still enforced byValidateStates; this union member just prevents the inference engine from rejecting_child: childFsmbefore the conditional mapping can evaluate it.
Type Parameters
Section titled “Type Parameters”TCtx
TStateNames
Section titled “TStateNames”TStateNames extends string = string