@ue-too/being-devtools / MachineLike
Type Alias: MachineLike
MachineLike =
object
Defined in: registry.ts:20
The structural surface a machine must have to be attached.
Remarks
Concrete TemplateStateMachines with literal-union States are not assignable to StateMachine<any, any, any, any> (the conditional in State['states'] plus method variance defeats any-erasure), so the public parameter type is this minimal shape, which they satisfy without a cast. The erasure happens once, inside MachineRegistry.attach.
Properties
context?
optionalcontext:unknown
Defined in: registry.ts:25
currentState
currentState:
unknown
Defined in: registry.ts:22
possibleStates
possibleStates: readonly
unknown[]
Defined in: registry.ts:24
states
states:
object
Defined in: registry.ts:23
Methods
happens()
happens(...
args):unknown
Defined in: registry.ts:21
Parameters
args
...any[]
Returns
unknown
onEventResult()?
optionalonEventResult(callback):void| () =>void
Defined in: registry.ts:27
Parameters
callback
(...args) => void
Returns
void | () => void
reset()
reset():
void
Defined in: registry.ts:26
Returns
void