(
config: {
types?: MachineTypes<
TContext,
TEvent,
TActor,
TAction,
TGuard,
TDelay,
TTag,
TInput,
TOutput,
TEmitted,
TMeta
>;
schemas?: unknown;
} & MachineConfig<
TContext,
TEvent,
TActor,
TAction,
TGuard,
TDelay,
TTag,
TInput,
TOutput,
TEmitted,
TMeta
>,
implementations?: InternalMachineImplementations<
ResolvedStateMachineTypes<
TContext,
TEvent,
TActor,
TAction,
TGuard,
TDelay,
TTag,
TEmitted
>
>
)
| 74 | * to provide machine implementations instead. |
| 75 | */ |
| 76 | export function createMachine< |
| 77 | TContext extends MachineContext, |
| 78 | TEvent extends AnyEventObject, // TODO: consider using a stricter `EventObject` here |
| 79 | TActor extends ProvidedActor, |
| 80 | TAction extends ParameterizedObject, |
| 81 | TGuard extends ParameterizedObject, |
| 82 | TDelay extends string, |
| 83 | TTag extends string, |
| 84 | TInput, |
| 85 | TOutput extends NonReducibleUnknown, |
| 86 | TEmitted extends EventObject, |
| 87 | TMeta extends MetaObject, |
| 88 | // it's important to have at least one default type parameter here |
| 89 | // it allows us to benefit from contextual type instantiation as it makes us to pass the hasInferenceCandidatesOrDefault check in the compiler |
| 90 | // we should be able to remove this when we start inferring TConfig, with it we'll always have an inference candidate |
| 91 | _ = any |
| 92 | >( |
| 93 | config: { |
| 94 | types?: MachineTypes< |
| 95 | TContext, |
| 96 | TEvent, |
| 97 | TActor, |
| 98 | TAction, |
| 99 | TGuard, |
| 100 | TDelay, |
| 101 | TTag, |
| 102 | TInput, |
| 103 | TOutput, |
| 104 | TEmitted, |
| 105 | TMeta |
| 106 | >; |
| 107 | schemas?: unknown; |
| 108 | } & MachineConfig< |
| 109 | TContext, |
| 110 | TEvent, |
| 111 | TActor, |
| 112 | TAction, |
| 113 | TGuard, |
| 114 | TDelay, |
| 115 | TTag, |
| 116 | TInput, |
| 117 | TOutput, |
| 118 | TEmitted, |
| 119 | TMeta |
| 120 | >, |
| 121 | implementations?: InternalMachineImplementations< |
| 122 | ResolvedStateMachineTypes< |
| 123 | TContext, |
| 124 | TEvent, |
| 125 | TActor, |
| 126 | TAction, |
| 127 | TGuard, |
| 128 | TDelay, |
| 129 | TTag, |
| 130 | TEmitted |
| 131 | > |
| 132 | > |
| 133 | ): StateMachine< |
no outgoing calls
searching dependent graphs…