setup
Callable
Type parameters
- TContext: MachineContext
- TEvent: AnyEventObject
- TActors: Record<Values<TChildrenMap>, UnknownActorLogic>
- TActions: Record<string, NonReducibleUnknown>
- TGuards: Record<string, NonReducibleUnknown>
- TDelay: string
- TTag: string
- TInput
- TOutput: NonReducibleUnknown
- TChildrenMap: Record<string, string> = never
Parameters
__namedParameters: { actions?: { [ K in string | number | symbol ]: ActionFunction<TContext, TEvent, TEvent, TActions[K], ToProvidedActor<TChildrenMap, TActors, DefaultToUnknownActorLogic<TActors>>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay> }; actors?: { [ K in string | number | symbol ]: TActors[K] }; delays?: { [ K in string ]: DelayConfig<TContext, TEvent, ToParameterizedObject<TActions>[params], TEvent> }; guards?: { [ K in string | number | symbol ]: GuardPredicate<TContext, TEvent, TGuards[K], ToParameterizedObject<TGuards>> }; types?: SetupTypes<TContext, TEvent, TChildrenMap, TTag, TInput, TOutput> }
Returns { createMachine: <TConfig>(config: TConfig) => StateMachine<TContext, TEvent, Cast<ToChildren<ToProvidedActor<TChildrenMap, TActors>>, Record<string, AnyActorRef | undefined>>, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, ToStateValue<TConfig>, TTag, TInput, TOutput, ResolveTypegenMeta<TypegenDisabled, TEvent, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, TTag>> }
createMachine: <TConfig>(config: TConfig) => StateMachine<TContext, TEvent, Cast<ToChildren<ToProvidedActor<TChildrenMap, TActors>>, Record<string, AnyActorRef | undefined>>, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, ToStateValue<TConfig>, TTag, TInput, TOutput, ResolveTypegenMeta<TypegenDisabled, TEvent, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, TTag>>
Type parameters
- TConfig: MachineConfig<TContext, TEvent, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, TTag, TInput, TOutput, ResolveTypegenMeta<TypegenDisabled, TEvent, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, TTag>>
Parameters
config: TConfig
Returns StateMachine<TContext, TEvent, Cast<ToChildren<ToProvidedActor<TChildrenMap, TActors>>, Record<string, AnyActorRef | undefined>>, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, ToStateValue<TConfig>, TTag, TInput, TOutput, ResolveTypegenMeta<TypegenDisabled, TEvent, ToProvidedActor<TChildrenMap, TActors>, ToParameterizedObject<TActions>, ToParameterizedObject<TGuards>, TDelay, TTag>>