xstate 6.0.0-alpha.55 → 6.0.0-alpha.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -201,7 +201,8 @@ export interface InvokeDefinition<TContext extends MachineContext, TEvent extend
|
|
|
201
201
|
/** The transition to take when the invoke-level `timeout` expires. */
|
|
202
202
|
onTimeout?: string | SingleOrArray<TransitionConfig<TContext, ActorTimeoutEvent, TEvent, TEmitted, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap>>;
|
|
203
203
|
}
|
|
204
|
-
export type AnyInvokeDefinition = InvokeDefinition<MachineContext, EventObject, EventObject,
|
|
204
|
+
export type AnyInvokeDefinition = InvokeDefinition<MachineContext, EventObject, EventObject, any, // TMeta
|
|
205
|
+
Sources['actions'], Sources['actors'], Sources['guards'], Sources['delays']>;
|
|
205
206
|
type Delay<TDelay extends string> = TDelay | number;
|
|
206
207
|
export type DelayedTransitions<TContext extends MachineContext, TEvent extends EventObject, TEmitted extends EventObject, TMeta extends MetaObject, TActionMap extends Sources['actions'], TActorMap extends Sources['actors'], TGuardMap extends Sources['guards'], TDelayMap extends Sources['delays']> = {
|
|
207
208
|
[K in Delay<keyof TDelayMap & string>]?: string | SingleOrArray<TransitionConfig<TContext, TEvent, TEvent, TEmitted, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap>> | TransitionConfigFunction<TContext, TEvent, TEvent, TODO, any, any, any, any, any>;
|
|
@@ -235,7 +236,8 @@ type TransitionFunctionArgs<TContext, TCurrentEvent extends EventObject, TEvent
|
|
|
235
236
|
guards: TGuardMap;
|
|
236
237
|
delays: TDelayMap;
|
|
237
238
|
} & OutputArg<TCurrentEvent>;
|
|
238
|
-
export type AnyTransitionConfigFunction = TransitionConfigFunction<any, any, any, any, any, any, any, any, any, any
|
|
239
|
+
export type AnyTransitionConfigFunction = TransitionConfigFunction<any, any, any, any, any, any, any, any, any, any, any, // _TCtx
|
|
240
|
+
any>;
|
|
239
241
|
export type TransitionsConfig<TContext extends MachineContext, TEvent extends EventObject, TEmitted extends EventObject, TMeta extends MetaObject, TActionMap extends Sources['actions'], TActorMap extends Sources['actors'], TGuardMap extends Sources['guards'], TDelayMap extends Sources['delays']> = {
|
|
240
242
|
[K in EventDescriptor<TEvent>]?: TransitionConfigOrTarget<TContext, ExtractEvent<TEvent, K>, TEvent, TEmitted, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap>;
|
|
241
243
|
};
|
|
@@ -341,7 +343,11 @@ export type InvokeConfig<TContext extends MachineContext, TEvent extends EventOb
|
|
|
341
343
|
onTimeout?: string | SingleOrArray<TransitionConfigOrTarget<TContext, ActorTimeoutEvent, TEvent, TEmitted, TMeta, any, any, any, any>>;
|
|
342
344
|
};
|
|
343
345
|
export type AnyInvokeConfig = InvokeConfig<any, any, any, any, any, any, any, any>;
|
|
344
|
-
export type AnyStateNodeConfig = Next_StateNodeConfig<any, any, any, any, any, any, any, any, any, any, any, any
|
|
346
|
+
export type AnyStateNodeConfig = Next_StateNodeConfig<any, any, any, any, any, any, any, any, any, any, any, any, any, // TInput
|
|
347
|
+
any, // TInputMap
|
|
348
|
+
any, // TSystemRegistry
|
|
349
|
+
any, // TChildOutput
|
|
350
|
+
any>;
|
|
345
351
|
export type AnyStateNode = StateNode<any, any> | StateNode<never, EventObject> | StateNode<any, EventObject> | StateNode<never, any>;
|
|
346
352
|
type LoosenMachineSnapshot<TSnapshot> = TSnapshot extends MachineSnapshot<any, any, any, any, any, any, any, any> ? Omit<TSnapshot, 'matches' | 'can'> & {
|
|
347
353
|
matches(partialStateValue: StateValue): boolean;
|