Skip to content

ChildLink

Defined in: types.ts:411

Internal adapter that wraps either an Fsm or BehavioralFsm child, presenting a uniform API for parent-initiated delegation.

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.

canHandle(client, inputName): boolean

Defined in: types.ts:413

Check if the child’s current state can handle this input

object

string

boolean


compositeState(client): string

Defined in: types.ts:421

The child FSM’s compositeState for the given client

object

string


dispose(): void

Defined in: types.ts:423

Dispose the child FSM

void


handle(client, inputName, …args): void

Defined in: types.ts:415

Dispatch the input to the child

object

string

unknown[]

void


onAny(callback): object

Defined in: types.ts:419

Subscribe to all child events (wildcard). Returns unsubscribe fn.

(eventName, data) => void

object

off(): void

void


reset(client): void

Defined in: types.ts:417

Reset the child to its initialState

object

void