Type aliases
ActionFunction
Action
Function<TContext, TEvent>: (context: TContext, event: TEvent, meta: ActionMeta<TContext, TEvent>) => void
Type parameters
Type declaration
-
- (context: TContext, event: TEvent, meta: ActionMeta<TContext, TEvent>): void
-
Parameters
-
context: TContext
-
event: TEvent
-
meta: ActionMeta<TContext, TEvent>
Returns void
ActionFunctionMap
Type parameters
ActionType
ActionType: string
ActivityConfig
Type parameters
ActorRefFrom
Actor
RefFrom<T>: T extends StateMachine<infer TContext, any, infer TEvent, infer TTypestate> ? SpawnedActorRef<TEvent, State<TContext, TEvent, any, TTypestate>> & { state: State<TContext, TEvent, any, TTypestate> } : never
Type parameters
AnyFunction
AnyFunction: (...args: any[]) => any
Assigner
Assigner<TContext, TEvent>
: (context
: TContext, event
: TEvent, meta
: AssignMeta<TContext, TEvent>) => Partial<TContext>
Type parameters
Type declaration
-
- (context: TContext, event: TEvent, meta: AssignMeta<TContext, TEvent>): Partial<TContext>
-
Parameters
-
context: TContext
-
event: TEvent
-
meta: AssignMeta<TContext, TEvent>
Returns Partial<TContext>
Cast
Cast<A1, A2>: A1 extends A2 ? A1 : A2
Type parameters
Compute
Compute<A>: {} & unknown
Type parameters
Condition
Type parameters
ConditionPredicate
Condition
Predicate<TContext, TEvent>: (context: TContext, event: TEvent, meta: GuardMeta<TContext, TEvent>) => boolean
Type parameters
Type declaration
-
- (context: TContext, event: TEvent, meta: GuardMeta<TContext, TEvent>): boolean
-
Parameters
-
context: TContext
-
event: TEvent
-
meta: GuardMeta<TContext, TEvent>
Returns boolean
ConditionalTransitionConfig
Conditional
TransitionConfig<TContext, TEvent>: Array<TransitionConfig<TContext, TEvent>>
Type parameters
Configuration
Configuration<TC, TE>
: Iterable<StateNode<TC, any, TE>>
Type parameters
ContextListener
ContextListener<TContext>: (context: TContext, prevContext: TContext | undefined) => void
Type parameters
Type declaration
-
- (context: TContext, prevContext: TContext | undefined): void
-
Parameters
-
context: TContext
-
prevContext: TContext | undefined
Returns void
DefaultContext
DefaultContext: Record<string, any> | undefined
DefaultGuardType
DefaultGuardType: "xstate.guard"
DelayConfig
Delay
Config<TContext, TEvent>: number | DelayExpr<TContext, TEvent>
Type parameters
DelayExpr
Delay
Expr<TContext, TEvent>: ExprWithMeta<TContext, TEvent, number>
Type parameters
DelayFunctionMap
Delay
FunctionMap<TContext, TEvent>: Record<string, DelayConfig<TContext, TEvent>>
Type parameters
DelayedTransitions
Type parameters
DisposeActivityFunction
DisposeActivityFunction: () => void
Event
Event<TEvent>: TEvent["type"] | TEvent
Type parameters
EventCreator
EventCreator<Self, Return>: Return extends object ? Return extends { type: any } ? "An event creator can't return an object with a type property" : Self : "An event creator must return an object"
Type parameters
EventCreators
EventCreators<Self>: {}
Type parameters
EventData
EventData: Record<string, any> & { type?: undefined }
EventFromEventCreators
EventFromEventCreators<EventCreators>: {}[keyof EventCreators]
Type parameters
EventListener
EventListener<TEvent>: (event: TEvent) => void
Type parameters
EventType
EventType: string
ExcludeType
ExcludeType<A>: {}
Type parameters
Expr
Expr<TContext, TEvent, T>: (context: TContext, event: TEvent) => T
Type parameters
Type declaration
-
- (context: TContext, event: TEvent): T
-
Parameters
-
context: TContext
-
event: TEvent
Returns T
ExprWithMeta
Expr
WithMeta<TContext, TEvent, T>: (context: TContext, event: TEvent, meta: SCXMLEventMeta<TEvent>) => T
Type parameters
Type declaration
-
-
Parameters
-
context: TContext
-
event: TEvent
-
Returns T
ExtractEvent
ExtractEvent<TEvent, TEventType>: TEvent extends { type: TEventType } ? TEvent : never
Type parameters
-
-
TEventType: TEvent["type"]
ExtractExtraParameters
ExtractExtraParameters<A, T>: A extends { type: T } ? ExcludeType<A> : never
Type parameters
ExtractSimple
ExtractSimple<A>: A extends any ? {} extends ExcludeType<A> ? A : never : never
Type parameters
ExtractStateValue
ExtractStateValue<TSchema>: keyof TSchema["states"]
Type parameters
FinalEventCreators
FinalEventCreators<Self>: {}
Type parameters
FinalModelCreators
Type parameters
Guard
Guard<TContext, TEvent>
: GuardPredicate<TContext, TEvent> | ({} & { type
: string })
Type parameters
InvokeCreator
Type parameters
-
TContext
-
TEvent
-
TFinalContext
Type declaration
-
-
Parameters
-
context: TContext
-
event: TEvent
-
KeysWithStates
KeysWithStates<TStates>: TStates extends object ? {}[keyof TStates] : never
Type parameters
Listener
Listener: () => void
LogExpr
Log
Expr<TContext, TEvent>: ExprWithMeta<TContext, TEvent, any>
Type parameters
Mapper
Mapper<TContext, TEvent, TParams>: (context: TContext, event: TEvent) => TParams
Type parameters
Type declaration
-
- (context: TContext, event: TEvent): TParams
-
Parameters
-
context: TContext
-
event: TEvent
Returns TParams
MetaObject
MetaObject: Record<string, any>
ModelContextFrom
ModelContextFrom<TModel>: TModel extends Model<infer TContext, any, any> ? TContext : never
Type parameters
-
TModel: Model<any, any, any>
ModelCreators
Type parameters
ModelEventsFrom
ModelEventsFrom<TModel>: TModel extends Model<any, infer TEvent, any> ? TEvent : never
Type parameters
-
TModel: Model<any, any, any>
NeverIfEmpty
NeverIfEmpty<T>: {} extends T ? never : T
Type parameters
PartialAssigner
Partial
Assigner<TContext, TEvent, TKey>: (context: TContext, event: TEvent, meta: AssignMeta<TContext, TEvent>) => TContext[TKey]
Type parameters
-
TContext
-
-
TKey: keyof TContext
Type declaration
-
- (context: TContext, event: TEvent, meta: AssignMeta<TContext, TEvent>): TContext[TKey]
-
Parameters
-
context: TContext
-
event: TEvent
-
meta: AssignMeta<TContext, TEvent>
Returns TContext[TKey]
Prop
Prop<T, K>: K extends keyof T ? T[K] : never
Type parameters
PropertyAssigner
PropertyAssigner<TContext, TEvent>: {}
Type parameters
PropertyMapper
PropertyMapper<TContext, TEvent, TParams>: {}
Type parameters
Receiver
Receiver<TEvent>: (listener: (event: TEvent) => void) => void
Type parameters
Type declaration
-
- (listener: (event: TEvent) => void): void
-
Parameters
-
listener: (event: TEvent) => void
Returns void
SendExpr
Send
Expr<TContext, TEvent, TSentEvent>: ExprWithMeta<TContext, TEvent, TSentEvent>
Type parameters
Sender
Sender<TEvent>
: (event
: Event<TEvent>) => void
Type parameters
Type declaration
-
- (event: Event<TEvent>): void
ServiceConfig
Type parameters
SimpleOrStateNodeConfig
Type parameters
SingleOrArray
SingleOrArray<T>: T[] | T
Type parameters
StateFrom
StateFrom<TMachine>: ReturnType<TMachine["transition"]>
Type parameters
StateKey
State
Key: string | State<any>
StateListener
State
Listener<TContext, TEvent, TStateSchema, TTypestate>: (state: State<TContext, TEvent, TStateSchema, TTypestate>, event: TEvent) => void
Type parameters
Type declaration
-
- (state: State<TContext, TEvent, TStateSchema, TTypestate>, event: TEvent): void
-
Parameters
-
state: State<TContext, TEvent, TStateSchema, TTypestate>
-
event: TEvent
Returns void
StateNodesConfig
StateNodesConfig<TContext, TStateSchema, TEvent>: {}
Type parameters
StatePatternTuple
StatePatternTuple<T, TContext, TEvent>: []
Type parameters
StateTypes
StateTypes: "atomic" | "compound" | "parallel" | "final" | "history" | string
StatesConfig
StatesConfig<TContext, TStateSchema, TEvent>: {}
Type parameters
StatesDefinition
StatesDefinition<TContext, TStateSchema, TEvent>: {}
Type parameters
Transition
Type parameters
TransitionConfigOrTarget
Type parameters
TransitionConfigTarget
Transition
ConfigTarget<TContext, TEvent>: string | undefined | StateNode<TContext, any, TEvent>
Type parameters
TransitionDefinitionMap
TransitionDefinitionMap<TContext, TEvent>: {}
Type parameters
TransitionTarget
Type parameters
TransitionTargets
Transition
Targets<TContext>: Array<string | StateNode<TContext, any>>
Type parameters
TransitionsConfig
Type parameters
TransitionsConfigArray
Type parameters
TransitionsConfigMap
Type parameters
ValueFromStateGetter
Value
FromStateGetter<T, TContext, TEvent>: (state: State<TContext, TEvent>) => T
Type parameters
Type declaration
-
- (state: State<TContext, TEvent>): T
-
Parameters
-
state: State<TContext, TEvent>
Returns T
The specified string event types or the specified event objects.