Skip to content

@ue-too/being / index / StateMachineSchema

介面: StateMachineSchema<Context, EventPayloadMapping, StateNames, EventOutputMapping>

定義於: schema-factory.ts:290

Complete schema definition for a state machine.

型別參數

Context

Context extends BaseContext = BaseContext

The context type

EventPayloadMapping

EventPayloadMapping = any

Mapping of event names to their payload types

StateNames

StateNames extends string = string

Union type of all valid state names (inferred from states array)

EventOutputMapping

EventOutputMapping extends Partial<Record<keyof EventPayloadMapping, unknown>> = DefaultOutputMapping<EventPayloadMapping>

Optional mapping of events to their output types

屬性

events

events: EventPayloadMapping

定義於: schema-factory.ts:301

Mapping of event names to their payload types


initialState

initialState: StateNames

定義於: schema-factory.ts:310

Initial state name


stateDefinitions

stateDefinitions: StateDefinition<Context, EventPayloadMapping, StateNames, EventOutputMapping>[]

定義於: schema-factory.ts:303

Array of state definitions


states

states: readonly StateNames[] | StateNames[]

定義於: schema-factory.ts:299

Array of all possible state names