xstate
Index
Classes
Enumerations
Functions
- __unsafe_getAllOwnEventDescriptors
- and
- assign
- cancel
- createActor
- createEmptyActor
- createMachine
- enqueueActions
- forwardTo
- fromCallback
- fromEventObservable
- fromObservable
- fromPromise
- fromTransition
- getStateNodes
- interpret
- isMachineSnapshot
- log
- matchesState
- not
- or
- pathToStateValue
- raise
- sendParent
- sendTo
- setup
- spawnChild
- stateIn
- stop
- stopChild
- toObserver
- waitFor
Interfaces
- ActionArgs
- ActorLike
- ActorLogic
- ActorOptions
- ActorRef
- ActorScope
- ActorSystem
- ActorSystemInfo
- AnyEventObject
- AssignAction
- AssignArgs
- AtomicStateNodeConfig
- BaseActorRef
- CancelAction
- ChooseBranch
- DelayedTransitionDefinition
- DoneActorEvent
- DoneStateEvent
- EnqueueActionsAction
- ErrorActorEvent
- HistoryStateNode
- HistoryStateNodeConfig
- InitialTransitionConfig
- InitialTransitionDefinition
- InspectedActorEvent
- InspectedEventEvent
- InspectedSnapshotEvent
- InteropObservable
- InteropSubscribable
- InvokeDefinition
- LogAction
- MachineImplementationsSimplified
- MachineTypes
- MarkAllImplementationsAsProvided
- ParameterizedObject
- ProvidedActor
- RaiseAction
- RaiseActionOptions
- RaiseActionParams
- ResolveTypegenMeta
- ResolvedTypegenMeta
- SendToAction
- SendToActionOptions
- SendToActionParams
- SetupTypes
- SnapshotEvent
- SpawnAction
- StateConfig
- StateLike
- StateMachineDefinition
- StateNodeConfig
- StateNodeDefinition
- StateValueMap
- StopAction
- Subscribable
- Subscription
- TransitionConfig
- TransitionDefinition
- TypegenDisabled
- TypegenEnabled
- TypegenMeta
- UnifiedArg
Type Aliases
- Action
- ActionFunction
- ActionFunctionMap
- Actions
- ActorLogicFrom
- ActorRefFrom
- AnyActor
- AnyActorLogic
- AnyActorRef
- AnyActorScope
- AnyFunction
- AnyHistoryValue
- AnyInterpreter
- AnyInvokeConfig
- AnyMachineSnapshot
- AnyState
- AnyStateConfig
- AnyStateMachine
- AnyStateNode
- AnyStateNodeConfig
- AnyStateNodeDefinition
- AnyTransitionConfig
- AnyTransitionDefinition
- AreAllImplementationsAssumedToBeProvided
- Assigner
- CallbackActorLogic
- CallbackSnapshot
- Cast
- Compute
- ConditionalRequired
- ContextFactory
- ContextFrom
- DelayConfig
- DelayExpr
- DelayFunctionMap
- DelayedTransitions
- DevToolsAdapter
- Elements
- Equals
- EventDescriptor
- EventFrom
- EventFromLogic
- EventObject
- ExtractEvent
- GetParameterizedParams
- HistoryValue
- HomomorphicOmit
- HomomorphicPick
- Identity
- IndexByProp
- IndexByType
- InferEvent
- InputFrom
- InspectionEvent
- InternalMachineImplementations
- Interpreter
- InterpreterFrom
- Invert
- InvokeConfig
- IsAny
- IsLiteralString
- IsNever
- IsNotNever
- Lazy
- LogExpr
- LowInfer
- MachineConfig
- MachineContext
- MachineImplementations
- MachineImplementationsFrom
- MachineSnapshot
- Mapper
- MaybeLazy
- Merge
- MetaObject
- MissingImplementationsError
- NoInfer
- NoRequiredParams
- NonReducibleUnknown
- ObservableActorLogic
- ObservableSnapshot
- Observer
- OutputFrom
- PartialAssigner
- PromiseActorLogic
- PromiseSnapshot
- Prop
- PropertyAssigner
- RequiredActorOptions
- SendExpr
- SimpleOrStateNodeConfig
- SingleOrArray
- Snapshot
- SnapshotFrom
- Spawner
- StateFrom
- StateKey
- StateNodesConfig
- StateSchema
- StateTypes
- StateValue
- StateValueFrom
- StatesConfig
- StatesDefinition
- TODO
- TagsFrom
- ToChildren
- TransitionActorLogic
- TransitionConfigOrTarget
- TransitionConfigTarget
- TransitionDefinitionMap
- TransitionSnapshot
- TransitionTarget
- Transitions
- TransitionsConfig
- TypegenConstraint
- UnknownAction
- UnknownActorLogic
- Values
- WithDynamicParams
- __ResolvedTypesMetaFrom
Type Aliases
Action
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
ActionFunction
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
Type declaration
Parameters
args: ActionArgs<TContext, TExpressionEvent, TEvent>
params: TParams
Returns void
optional_out_TAction?: TAction
optional_out_TActor?: TActor
optional_out_TDelay?: TDelay
optional_out_TEvent?: TEvent
optional_out_TGuard?: TGuard
ActionFunctionMap
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor
- TAction: ParameterizedObject = ParameterizedObject
- TGuard: ParameterizedObject = ParameterizedObject
- TDelay: string = string
Actions
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
ActorLogicFrom
Type parameters
- T
ActorRefFrom
Type parameters
- T
AnyActor
AnyActorLogic
AnyActorRef
AnyActorScope
AnyFunction
Type declaration
Parameters
rest...args: any[]
Returns any
AnyHistoryValue
AnyInterpreter
AnyInvokeConfig
AnyMachineSnapshot
AnyState
AnyStateConfig
AnyStateMachine
AnyStateNode
AnyStateNodeConfig
AnyStateNodeDefinition
AnyTransitionConfig
AnyTransitionDefinition
AreAllImplementationsAssumedToBeProvided
Assigner
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TEvent: EventObject
- TActor: ProvidedActor
Type declaration
Parameters
args: AssignArgs<TContext, TExpressionEvent, TEvent, TActor>
params: TParams
Returns Partial<TContext>
CallbackActorLogic
Type parameters
- TEvent: EventObject
- TInput = NonReducibleUnknown
CallbackSnapshot
Type parameters
- TInput
Cast
Type parameters
- A
- B
Compute
Type parameters
- A: any
ConditionalRequired
Type parameters
- T
- Condition: boolean
ContextFactory
Type parameters
- TContext: MachineContext
- TActor: ProvidedActor
- TInput
Type declaration
Parameters
{ spawn, input }: { input: TInput; spawn: Spawner<TActor> }
Returns TContext
ContextFrom
Type parameters
- T
DelayConfig
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TEvent: EventObject
DelayExpr
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TEvent: EventObject
Type declaration
Parameters
args: ActionArgs<TContext, TExpressionEvent, TEvent>
params: TParams
Returns number
DelayFunctionMap
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TAction: ParameterizedObject
DelayedTransitions
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
DevToolsAdapter
Type declaration
Parameters
service: AnyActor
Returns void
Elements
Type parameters
- T
Equals
Type parameters
- A1: any
- A2: any
EventDescriptor
Type parameters
- TEvent: EventObject
EventFrom
Type parameters
- T
- K: Prop<TEvent, type> = never
- TEvent: EventObject = ResolveEventType<T>
EventFromLogic
Type parameters
- TLogic: ActorLogic<any, any, any, any>
EventObject
The full definition of an event, with a string type
.
Type declaration
type: string
The type of event that is sent.
ExtractEvent
Type parameters
- TEvent: EventObject
- TDescriptor: EventDescriptor<TEvent>
GetParameterizedParams
Type parameters
- T: ParameterizedObject | undefined
HistoryValue
Type parameters
- TContext: MachineContext
- TEvent: EventObject
HomomorphicOmit
Type parameters
- T
- K: keyof any
HomomorphicPick
Type parameters
- T
- K: keyof any
Identity
Type parameters
- T
IndexByProp
Type parameters
- T: Record<P, string>
- P: keyof T
IndexByType
Type parameters
- T: { type: string }
InferEvent
Type parameters
- E: EventObject
InputFrom
Type parameters
- T
InspectionEvent
InternalMachineImplementations
Type parameters
- TContext: MachineContext
- TResolvedTypesMeta
- TRequireMissingImplementations: boolean = false
- TMissingImplementations = Prop<Prop<TResolvedTypesMeta, resolved>, missingImplementations>
Interpreter
InterpreterFrom
Invert
Type parameters
- T: Record<PropertyKey, PropertyKey>
InvokeConfig
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
IsAny
Type parameters
- T
IsLiteralString
Type parameters
- T: string
IsNever
Type parameters
- T
IsNotNever
Type parameters
- T
Lazy
Type parameters
- T
Type declaration
Returns T
LogExpr
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TEvent: EventObject
Type declaration
Parameters
args: ActionArgs<TContext, TExpressionEvent, TEvent>
params: TParams
Returns unknown
LowInfer
Type parameters
- T
MachineConfig
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor = ProvidedActor
- TAction: ParameterizedObject = ParameterizedObject
- TGuard: ParameterizedObject = ParameterizedObject
- TDelay: string = string
- TTag: string = string
- TInput = any
- TOutput = unknown
- TTypesMeta = TypegenDisabled
MachineContext
MachineImplementations
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor = ProvidedActor
- TAction: ParameterizedObject = ParameterizedObject
- TGuard: ParameterizedObject = ParameterizedObject
- TDelay: string = string
- TTag: string = string
- TTypesMeta: TypegenConstraint = TypegenDisabled
MachineImplementationsFrom
Type parameters
- T: AnyStateMachine | (...args: any[]) => AnyStateMachine
- TRequireMissingImplementations: boolean = false
MachineSnapshot
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TChildren: Record<string, AnyActorRef | undefined>
- TStateValue: StateValue
- TTag: string
- TOutput
- TResolvedTypesMeta = TypegenDisabled
Mapper
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TResult
- TEvent: EventObject
Type declaration
Parameters
args: { context: TContext; event: TExpressionEvent; self: ActorRef<MachineSnapshot<TContext, TEvent, Record<string, AnyActorRef>, StateValue, string, unknown>, TEvent> }
Returns TResult
MaybeLazy
Type parameters
- T
Merge
Type parameters
- M
- N
MetaObject
MissingImplementationsError
NoInfer
Type parameters
- T
NoRequiredParams
Type parameters
NonReducibleUnknown
ObservableActorLogic
Type parameters
- TContext
- TInput: NonReducibleUnknown
ObservableSnapshot
Type parameters
- TContext
- TInput: NonReducibleUnknown
Observer
Type parameters
- T
Type declaration
optionalcomplete?: () => void
Returns void
optionalerror?: (err: unknown) => void
Parameters
err: unknown
Returns void
optionalnext?: (value: T) => void
Parameters
value: T
Returns void
OutputFrom
Type parameters
- T
PartialAssigner
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TEvent: EventObject
- TActor: ProvidedActor
- TKey: keyof TContext
Type declaration
Parameters
args: AssignArgs<TContext, TExpressionEvent, TEvent, TActor>
params: TParams
Returns TContext[TKey]
PromiseActorLogic
Type parameters
- TOutput
- TInput = unknown
PromiseSnapshot
Type parameters
- TOutput
- TInput
Prop
Type parameters
- T
- K
PropertyAssigner
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TEvent: EventObject
- TActor: ProvidedActor
RequiredActorOptions
Type parameters
- TActor: ProvidedActor
SendExpr
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: ParameterizedObject[params] | undefined
- TSentEvent: EventObject
- TEvent: EventObject
Type declaration
Parameters
args: ActionArgs<TContext, TExpressionEvent, TEvent>
params: TParams
Returns TSentEvent
SimpleOrStateNodeConfig
Type parameters
- TContext: MachineContext
- TEvent: EventObject
SingleOrArray
Type parameters
- T
Snapshot
Type parameters
- TOutput
SnapshotFrom
Type parameters
- T
Spawner
Type parameters
- TActor: ProvidedActor
StateFrom
Type parameters
- T: AnyStateMachine | (...args: any[]) => AnyStateMachine
StateKey
StateNodesConfig
Type parameters
- TContext: MachineContext
- TEvent: EventObject
StateSchema
Type declaration
optionalstates?: Record<string, StateSchema>
StateTypes
StateValue
The string or object representing the state value relative to the parent state node.
StateValueFrom
Type parameters
- TMachine: AnyStateMachine
StatesConfig
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
- TTag: string
- TOutput
StatesDefinition
Type parameters
- TContext: MachineContext
- TEvent: EventObject
TODO
TagsFrom
Type parameters
- TMachine: AnyStateMachine
ToChildren
Type parameters
- TActor: ProvidedActor
TransitionActorLogic
Type parameters
- TContext
- TEvent: EventObject
- TInput: NonReducibleUnknown
TransitionConfigOrTarget
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TEvent: EventObject
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
TransitionConfigTarget
TransitionDefinitionMap
Type parameters
- TContext: MachineContext
- TEvent: EventObject
TransitionSnapshot
Type parameters
- TContext
TransitionTarget
Transitions
Type parameters
- TContext: MachineContext
- TEvent: EventObject
TransitionsConfig
Type parameters
- TContext: MachineContext
- TEvent: EventObject
- TActor: ProvidedActor
- TAction: ParameterizedObject
- TGuard: ParameterizedObject
- TDelay: string
TypegenConstraint
UnknownAction
UnknownActorLogic
Values
Type parameters
- T
WithDynamicParams
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- T: ParameterizedObject
__ResolvedTypesMetaFrom
Type parameters
- T
Use
AnyActor
instead.