ChildLink
Defined in: types.ts:411
Internal adapter that wraps either an Fsm or BehavioralFsm child, presenting a uniform API for parent-initiated delegation.
Properties
Section titled “Properties”instance
Section titled “instance”instance:
MachinaInstance
Defined in: types.ts:430
The raw Fsm or BehavioralFsm instance this ChildLink wraps. Exposed for inspection tooling (machina-inspect) — allows external tools to introspect child graph structure without reaching through private fields.
Methods
Section titled “Methods”canHandle()
Section titled “canHandle()”canHandle(
client,inputName):boolean
Defined in: types.ts:413
Check if the child’s current state can handle this input
Parameters
Section titled “Parameters”client
Section titled “client”object
inputName
Section titled “inputName”string
Returns
Section titled “Returns”boolean
compositeState()
Section titled “compositeState()”compositeState(
client):string
Defined in: types.ts:421
The child FSM’s compositeState for the given client
Parameters
Section titled “Parameters”client
Section titled “client”object
Returns
Section titled “Returns”string
dispose()
Section titled “dispose()”dispose():
void
Defined in: types.ts:423
Dispose the child FSM
Returns
Section titled “Returns”void
handle()
Section titled “handle()”handle(
client,inputName, …args):void
Defined in: types.ts:415
Dispatch the input to the child
Parameters
Section titled “Parameters”client
Section titled “client”object
inputName
Section titled “inputName”string
…unknown[]
Returns
Section titled “Returns”void
onAny()
Section titled “onAny()”onAny(
callback):object
Defined in: types.ts:419
Subscribe to all child events (wildcard). Returns unsubscribe fn.
Parameters
Section titled “Parameters”callback
Section titled “callback”(eventName, data) => void
Returns
Section titled “Returns”object
off():
void
Returns
Section titled “Returns”void
reset()
Section titled “reset()”reset(
client):void
Defined in: types.ts:417
Reset the child to its initialState
Parameters
Section titled “Parameters”client
Section titled “client”object
Returns
Section titled “Returns”void