xstate 5.0.0-beta.12 → 5.0.0-beta.13

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.
Files changed (30) hide show
  1. package/dist/declarations/src/Machine.d.ts +3 -3
  2. package/dist/declarations/src/SimulatedClock.d.ts +1 -1
  3. package/dist/declarations/src/State.d.ts +3 -3
  4. package/dist/declarations/src/StateMachine.d.ts +4 -4
  5. package/dist/declarations/src/StateNode.d.ts +3 -3
  6. package/dist/declarations/src/actionTypes.d.ts +1 -1
  7. package/dist/declarations/src/actions/assign.d.ts +1 -1
  8. package/dist/declarations/src/actions/cancel.d.ts +2 -2
  9. package/dist/declarations/src/actions/choose.d.ts +2 -2
  10. package/dist/declarations/src/actions/log.d.ts +2 -2
  11. package/dist/declarations/src/actions/pure.d.ts +2 -2
  12. package/dist/declarations/src/actions/raise.d.ts +1 -1
  13. package/dist/declarations/src/actions/send.d.ts +2 -2
  14. package/dist/declarations/src/actions/stop.d.ts +1 -1
  15. package/dist/declarations/src/actions.d.ts +10 -10
  16. package/dist/declarations/src/actors/callback.d.ts +1 -1
  17. package/dist/declarations/src/actors/index.d.ts +5 -5
  18. package/dist/declarations/src/actors/observable.d.ts +1 -1
  19. package/dist/declarations/src/actors/promise.d.ts +1 -1
  20. package/dist/declarations/src/actors/transition.d.ts +1 -1
  21. package/dist/declarations/src/dev/index.d.ts +1 -1
  22. package/dist/declarations/src/guards.d.ts +2 -2
  23. package/dist/declarations/src/index.d.ts +22 -22
  24. package/dist/declarations/src/interpreter.d.ts +4 -4
  25. package/dist/declarations/src/stateUtils.d.ts +5 -5
  26. package/dist/declarations/src/typegenTypes.d.ts +1 -1
  27. package/dist/declarations/src/types.d.ts +6 -6
  28. package/dist/declarations/src/utils.d.ts +4 -4
  29. package/dist/declarations/src/waitFor.d.ts +1 -1
  30. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { MachineConfig, EventObject, AnyEventObject, MachineContext, ActorMap, InternalMachineImplementations, ParameterizedObject } from './types.ts';
2
- import { TypegenConstraint, TypegenDisabled, ResolveTypegenMeta } from './typegenTypes.ts';
3
- import { StateMachine } from './StateMachine.ts';
1
+ import { MachineConfig, EventObject, AnyEventObject, MachineContext, ActorMap, InternalMachineImplementations, ParameterizedObject } from "./types.js";
2
+ import { TypegenConstraint, TypegenDisabled, ResolveTypegenMeta } from "./typegenTypes.js";
3
+ import { StateMachine } from "./StateMachine.js";
4
4
  export declare function createMachine<TContext extends MachineContext, TEvent extends EventObject = AnyEventObject, TActorMap extends ActorMap = ActorMap, TTypesMeta extends TypegenConstraint = TypegenDisabled>(config: MachineConfig<TContext, TEvent, ParameterizedObject, TActorMap, TTypesMeta>, implementations?: InternalMachineImplementations<TContext, TEvent, ResolveTypegenMeta<TTypesMeta, TEvent, ParameterizedObject, TActorMap>>): StateMachine<TContext, TEvent, ParameterizedObject, TActorMap, ResolveTypegenMeta<TTypesMeta, TEvent, ParameterizedObject, TActorMap>>;
@@ -1,4 +1,4 @@
1
- import { Clock } from './interpreter.ts';
1
+ import { Clock } from "./interpreter.js";
2
2
  export interface SimulatedClock extends Clock {
3
3
  start(speed: number): void;
4
4
  increment(ms: number): void;
@@ -1,6 +1,6 @@
1
- import type { StateNode } from './StateNode.ts';
2
- import { TypegenDisabled, TypegenEnabled } from './typegenTypes.ts';
3
- import type { ActorRef, AnyState, AnyStateMachine, BaseActionObject, EventObject, HistoryValue, MachineContext, PersistedMachineState, Prop, StateConfig, StateValue, TransitionDefinition } from './types.ts';
1
+ import type { StateNode } from "./StateNode.js";
2
+ import { TypegenDisabled, TypegenEnabled } from "./typegenTypes.js";
3
+ import type { ActorRef, AnyState, AnyStateMachine, BaseActionObject, EventObject, HistoryValue, MachineContext, PersistedMachineState, Prop, StateConfig, StateValue, TransitionDefinition } from "./types.js";
4
4
  export declare function isStateConfig<TContext extends MachineContext, TEvent extends EventObject>(state: any): state is StateConfig<TContext, TEvent>;
5
5
  /**
6
6
  * @deprecated Use `isStateConfig(object)` or `state instanceof State` instead.
@@ -1,7 +1,7 @@
1
- import { State } from './State.ts';
2
- import { StateNode } from './StateNode.ts';
3
- import type { AreAllImplementationsAssumedToBeProvided, MarkAllImplementationsAsProvided, ResolveTypegenMeta, TypegenDisabled } from './typegenTypes.ts';
4
- import type { ActorContext, ActorMap, ActorBehavior, EventObject, InternalMachineImplementations, MachineConfig, MachineContext, MachineImplementationsSimplified, MachineTypes, NoInfer, StateConfig, StateMachineDefinition, StateValue, TransitionDefinition, PersistedMachineState, ParameterizedObject, AnyActorContext } from './types.ts';
1
+ import { State } from "./State.js";
2
+ import { StateNode } from "./StateNode.js";
3
+ import type { AreAllImplementationsAssumedToBeProvided, MarkAllImplementationsAsProvided, ResolveTypegenMeta, TypegenDisabled } from "./typegenTypes.js";
4
+ import type { ActorContext, ActorMap, ActorBehavior, EventObject, InternalMachineImplementations, MachineConfig, MachineContext, MachineImplementationsSimplified, MachineTypes, NoInfer, StateConfig, StateMachineDefinition, StateValue, TransitionDefinition, PersistedMachineState, ParameterizedObject, AnyActorContext } from "./types.js";
5
5
  export declare const NULL_EVENT = "";
6
6
  export declare const STATE_IDENTIFIER = "#";
7
7
  export declare const WILDCARD = "*";
@@ -1,6 +1,6 @@
1
- import type { EventObject, StateNodeDefinition, TransitionDefinition, DelayedTransitionDefinition, StateNodeConfig, StateNodesConfig, InvokeDefinition, Mapper, PropertyMapper, TransitionDefinitionMap, InitialTransitionDefinition, MachineContext, BaseActionObject } from './types.ts';
2
- import type { State } from './State.ts';
3
- import type { StateMachine } from './StateMachine.ts';
1
+ import type { EventObject, StateNodeDefinition, TransitionDefinition, DelayedTransitionDefinition, StateNodeConfig, StateNodesConfig, InvokeDefinition, Mapper, PropertyMapper, TransitionDefinitionMap, InitialTransitionDefinition, MachineContext, BaseActionObject } from "./types.js";
2
+ import type { State } from "./State.js";
3
+ import type { StateMachine } from "./StateMachine.js";
4
4
  interface StateNodeOptions<TContext extends MachineContext, TEvent extends EventObject> {
5
5
  _key: string;
6
6
  _parent?: StateNode<TContext, TEvent>;
@@ -1,4 +1,4 @@
1
- import { ActionTypes } from './types.ts';
1
+ import { ActionTypes } from "./types.js";
2
2
  export declare const stop = ActionTypes.Stop;
3
3
  export declare const raise = ActionTypes.Raise;
4
4
  export declare const send = ActionTypes.Send;
@@ -1,4 +1,4 @@
1
- import type { EventObject, Assigner, PropertyAssigner, MachineContext, DynamicAssignAction, LowInfer } from '../types.ts';
1
+ import type { EventObject, Assigner, PropertyAssigner, MachineContext, DynamicAssignAction, LowInfer } from "../types.js";
2
2
  /**
3
3
  * Updates the current context of the machine.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { EventObject, ExprWithMeta, MachineContext } from '../types.ts';
2
- import { BaseDynamicActionObject, CancelActionObject, DynamicCancelActionObject } from '../index.ts';
1
+ import { EventObject, ExprWithMeta, MachineContext } from "../types.js";
2
+ import { BaseDynamicActionObject, CancelActionObject, DynamicCancelActionObject } from "../index.js";
3
3
  /**
4
4
  * Cancels an in-flight `send(...)` action. A canceled sent action will not
5
5
  * be executed, nor will its event be sent, unless it has already been sent
@@ -1,3 +1,3 @@
1
- import { EventObject, ChooseCondition, MachineContext } from '../types.ts';
2
- import { BaseDynamicActionObject, ChooseAction, ResolvedChooseAction } from '../index.ts';
1
+ import { EventObject, ChooseCondition, MachineContext } from "../types.js";
2
+ import { BaseDynamicActionObject, ChooseAction, ResolvedChooseAction } from "../index.js";
3
3
  export declare function choose<TContext extends MachineContext, TExpressionEvent extends EventObject, TEvent extends EventObject>(guards: Array<ChooseCondition<TContext, TExpressionEvent>>): BaseDynamicActionObject<TContext, TExpressionEvent, TEvent, ResolvedChooseAction, ChooseAction<TContext, TExpressionEvent>['params']>;
@@ -1,5 +1,5 @@
1
- import { EventObject, LogExpr, MachineContext, LogActionObject } from '../types.ts';
2
- import { BaseDynamicActionObject, DynamicLogAction } from '../index.ts';
1
+ import { EventObject, LogExpr, MachineContext, LogActionObject } from "../types.js";
2
+ import { BaseDynamicActionObject, DynamicLogAction } from "../index.js";
3
3
  /**
4
4
  *
5
5
  * @param expr The expression function to evaluate which will be logged.
@@ -1,5 +1,5 @@
1
- import { EventObject, SingleOrArray, MachineContext } from '../types.ts';
2
- import { BaseActionObject, BaseDynamicActionObject, DynamicPureActionObject, PureActionObject } from '..';
1
+ import { EventObject, SingleOrArray, MachineContext } from "../types.js";
2
+ import { BaseActionObject, BaseDynamicActionObject, DynamicPureActionObject, PureActionObject } from "../index.js";
3
3
  export declare function pure<TContext extends MachineContext, TExpressionEvent extends EventObject, TEvent extends EventObject = TExpressionEvent>(getActions: ({ context, event }: {
4
4
  context: TContext;
5
5
  event: TExpressionEvent;
@@ -1,4 +1,4 @@
1
- import { EventObject, MachineContext, RaiseActionObject, BaseDynamicActionObject, RaiseActionOptions, SendExpr, RaiseActionParams, NoInfer } from '../types.ts';
1
+ import { EventObject, MachineContext, RaiseActionObject, BaseDynamicActionObject, RaiseActionOptions, SendExpr, RaiseActionParams, NoInfer } from "../types.js";
2
2
  /**
3
3
  * Raises an event. This places the event in the internal event queue, so that
4
4
  * the event is immediately consumed by the machine in the current step.
@@ -1,5 +1,5 @@
1
- import { EventObject, SendActionParams, SendExpr, AnyEventObject, MachineContext } from '../types.ts';
2
- import { AnyActorRef, BaseDynamicActionObject, Cast, EventFrom, ExprWithMeta, InferEvent, SendActionObject, SendActionOptions } from '../index.ts';
1
+ import { EventObject, SendActionParams, SendExpr, AnyEventObject, MachineContext } from "../types.js";
2
+ import { AnyActorRef, BaseDynamicActionObject, Cast, EventFrom, ExprWithMeta, InferEvent, SendActionObject, SendActionOptions } from "../index.js";
3
3
  /**
4
4
  * Sends an event. This returns an action that will be read by an interpreter to
5
5
  * send the event in the next step, after the current step is finished executing.
@@ -1,4 +1,4 @@
1
- import { ActorRef, BaseDynamicActionObject, DynamicStopActionObject, EventObject, Expr, MachineContext, StopActionObject } from '../types.ts';
1
+ import { ActorRef, BaseDynamicActionObject, DynamicStopActionObject, EventObject, Expr, MachineContext, StopActionObject } from "../types.js";
2
2
  /**
3
3
  * Stops an actor.
4
4
  *
@@ -1,13 +1,13 @@
1
- import { Action, EventObject, SingleOrArray, ActionFunction, ActionFunctionMap, ActionTypes, DoneEvent, ErrorPlatformEvent, DoneEventObject, MachineContext, BaseActionObject } from './types.ts';
2
- import * as actionTypes from './actionTypes.ts';
3
- export { send, sendTo, sendParent, forwardTo, escalate } from './actions/send.ts';
4
- export { stop } from './actions/stop.ts';
5
- export { log } from './actions/log.ts';
6
- export { cancel } from './actions/cancel.ts';
7
- export { assign } from './actions/assign.ts';
8
- export { raise } from './actions/raise.ts';
9
- export { choose } from './actions/choose.ts';
10
- export { pure } from './actions/pure.ts';
1
+ import { Action, EventObject, SingleOrArray, ActionFunction, ActionFunctionMap, ActionTypes, DoneEvent, ErrorPlatformEvent, DoneEventObject, MachineContext, BaseActionObject } from "./types.js";
2
+ import * as actionTypes from "./actionTypes.js";
3
+ export { send, sendTo, sendParent, forwardTo, escalate } from "./actions/send.js";
4
+ export { stop } from "./actions/stop.js";
5
+ export { log } from "./actions/log.js";
6
+ export { cancel } from "./actions/cancel.js";
7
+ export { assign } from "./actions/assign.js";
8
+ export { raise } from "./actions/raise.js";
9
+ export { choose } from "./actions/choose.js";
10
+ export { pure } from "./actions/pure.js";
11
11
  export { actionTypes };
12
12
  export declare const initEvent: {
13
13
  type: ActionTypes;
@@ -1,4 +1,4 @@
1
- import { InvokeCallback, ActorBehavior, EventObject } from '../types';
1
+ import { InvokeCallback, ActorBehavior, EventObject } from "../types.js";
2
2
  export interface CallbackInternalState {
3
3
  canceled: boolean;
4
4
  receivers: Set<(e: EventObject) => void>;
@@ -1,8 +1,8 @@
1
- import type { EventObject, ActorRef, BaseActorRef, AnyEventObject } from '../types.ts';
2
- export { fromTransition } from './transition.ts';
3
- export { fromPromise } from './promise.ts';
4
- export { fromObservable, fromEventObservable } from './observable.ts';
5
- export { fromCallback } from './callback.ts';
1
+ import type { EventObject, ActorRef, BaseActorRef, AnyEventObject } from "../types.js";
2
+ export { fromTransition } from "./transition.js";
3
+ export { fromPromise } from "./promise.js";
4
+ export { fromObservable, fromEventObservable } from "./observable.js";
5
+ export { fromCallback } from "./callback.js";
6
6
  export declare const startSignalType = "xstate.init";
7
7
  export declare const stopSignalType = "xstate.stop";
8
8
  export declare const startSignal: StartSignal;
@@ -1,4 +1,4 @@
1
- import { Subscribable, ActorBehavior, EventObject, Subscription } from '../types';
1
+ import { Subscribable, ActorBehavior, EventObject, Subscription } from "../types.js";
2
2
  export interface ObservableInternalState<T> {
3
3
  subscription: Subscription | undefined;
4
4
  status: 'active' | 'done' | 'error' | 'canceled';
@@ -1,4 +1,4 @@
1
- import { ActorBehavior } from '../types';
1
+ import { ActorBehavior } from "../types.js";
2
2
  export interface PromiseInternalState<T> {
3
3
  status: 'active' | 'error' | 'done' | 'canceled';
4
4
  data: T | undefined;
@@ -1,4 +1,4 @@
1
- import { ActorBehavior, ActorContext, ActorSystem, EventObject } from '../types';
1
+ import { ActorBehavior, ActorContext, ActorSystem, EventObject } from "../types.js";
2
2
  /**
3
3
  * Returns an actor behavior from a transition function and its initial state.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { AnyInterpreter, DevToolsAdapter } from '../types.ts';
1
+ import { AnyInterpreter, DevToolsAdapter } from "../types.js";
2
2
  type ServiceListener = (service: AnyInterpreter) => void;
3
3
  export interface XStateDevInterface {
4
4
  register: (service: AnyInterpreter) => void;
@@ -1,5 +1,5 @@
1
- import type { EventObject, StateValue, BooleanGuardDefinition, GuardConfig, GuardDefinition, GuardPredicate, MachineContext } from './types.ts';
2
- import type { State } from './State.ts';
1
+ import type { EventObject, StateValue, BooleanGuardDefinition, GuardConfig, GuardDefinition, GuardPredicate, MachineContext } from "./types.js";
2
+ import type { State } from "./State.js";
3
3
  export declare function stateIn<TContext extends MachineContext, TEvent extends EventObject>(stateValue: StateValue): GuardDefinition<TContext, TEvent>;
4
4
  export declare function not<TContext extends MachineContext, TEvent extends EventObject>(guard: GuardConfig<TContext, TEvent>): BooleanGuardDefinition<TContext, TEvent>;
5
5
  export declare function and<TContext extends MachineContext, TEvent extends EventObject>(guards: Array<GuardConfig<TContext, TEvent>>): BooleanGuardDefinition<TContext, TEvent>;
@@ -1,26 +1,26 @@
1
- import { doneInvoke, forwardTo, sendParent, sendTo } from './actions.ts';
2
- export { assign } from './actions/assign.ts';
3
- export { cancel } from './actions/cancel.ts';
4
- export { choose } from './actions/choose.ts';
5
- export { log } from './actions/log.ts';
6
- export { pure } from './actions/pure.ts';
7
- export { raise } from './actions/raise.ts';
8
- export { stop } from './actions/stop.ts';
9
- import { interpret, Interpreter, ActorStatus } from './interpreter.ts';
10
- import { createMachine } from './Machine.ts';
11
- import { mapState } from './mapState.ts';
12
- import { State } from './State.ts';
13
- import { StateNode } from './StateNode.ts';
14
- export { SimulatedClock } from './SimulatedClock.ts';
15
- export { StateMachine } from './StateMachine.ts';
16
- export { getStateNodes } from './stateUtils.ts';
17
- export { waitFor } from './waitFor.ts';
18
- export * from './typegenTypes.ts';
19
- export * from './types.ts';
20
- export { matchesState, pathToStateValue, toObserver } from './utils.ts';
1
+ import { doneInvoke, forwardTo, sendParent, sendTo } from "./actions.js";
2
+ export { assign } from "./actions/assign.js";
3
+ export { cancel } from "./actions/cancel.js";
4
+ export { choose } from "./actions/choose.js";
5
+ export { log } from "./actions/log.js";
6
+ export { pure } from "./actions/pure.js";
7
+ export { raise } from "./actions/raise.js";
8
+ export { stop } from "./actions/stop.js";
9
+ import { interpret, Interpreter, ActorStatus } from "./interpreter.js";
10
+ import { createMachine } from "./Machine.js";
11
+ import { mapState } from "./mapState.js";
12
+ import { State } from "./State.js";
13
+ import { StateNode } from "./StateNode.js";
14
+ export { SimulatedClock } from "./SimulatedClock.js";
15
+ export { StateMachine } from "./StateMachine.js";
16
+ export { getStateNodes } from "./stateUtils.js";
17
+ export { waitFor } from "./waitFor.js";
18
+ export * from "./typegenTypes.js";
19
+ export * from "./types.js";
20
+ export { matchesState, pathToStateValue, toObserver } from "./utils.js";
21
21
  export { StateNode, State, mapState, sendTo, sendParent, forwardTo, interpret, Interpreter, ActorStatus as InterpreterStatus, doneInvoke, createMachine };
22
- export { fromPromise, fromObservable, fromCallback, fromEventObservable, fromTransition } from './actors/index.ts';
23
- export { stateIn, not, and, or } from './guards.ts';
22
+ export { fromPromise, fromObservable, fromCallback, fromEventObservable, fromTransition } from "./actors/index.js";
23
+ export { stateIn, not, and, or } from "./guards.js";
24
24
  declare global {
25
25
  interface SymbolConstructor {
26
26
  readonly observable: symbol;
@@ -1,7 +1,7 @@
1
- import { symbolObservable } from './symbolObservable.ts';
2
- import { AreAllImplementationsAssumedToBeProvided, MissingImplementationsError } from './typegenTypes.ts';
3
- import type { ActorSystem, AnyActorBehavior, AnyStateMachine, EventFromBehavior, InterpreterFrom, PersistedStateFrom, RaiseActionObject, SnapshotFrom } from './types.ts';
4
- import { ActorRef, EventObject, InteropSubscribable, InterpreterOptions, Observer, SendActionObject, Subscription } from './types.ts';
1
+ import { symbolObservable } from "./symbolObservable.js";
2
+ import { AreAllImplementationsAssumedToBeProvided, MissingImplementationsError } from "./typegenTypes.js";
3
+ import type { ActorSystem, AnyActorBehavior, AnyStateMachine, EventFromBehavior, InterpreterFrom, PersistedStateFrom, RaiseActionObject, SnapshotFrom } from "./types.js";
4
+ import { ActorRef, EventObject, InteropSubscribable, InterpreterOptions, Observer, SendActionObject, Subscription } from "./types.js";
5
5
  export type SnapshotListener<TBehavior extends AnyActorBehavior> = (state: SnapshotFrom<TBehavior>) => void;
6
6
  export type EventListener<TEvent extends EventObject = EventObject> = (event: TEvent) => void;
7
7
  export type Listener = () => void;
@@ -1,8 +1,8 @@
1
- import { BaseActionObject, EventObject, StateValue, TransitionConfig, TransitionDefinition, SingleOrArray, StateValueMap, InitialTransitionConfig, MachineContext } from './types.ts';
2
- import { State } from './State.ts';
3
- import { NULL_EVENT } from './constants.ts';
4
- import type { StateNode } from './StateNode.ts';
5
- import { AnyActorContext, AnyHistoryValue, AnyState, AnyStateMachine, AnyStateNode, AnyTransitionDefinition, DelayedTransitionDefinition, InitialTransitionDefinition, StateFromMachine } from '.';
1
+ import { BaseActionObject, EventObject, StateValue, TransitionConfig, TransitionDefinition, SingleOrArray, StateValueMap, InitialTransitionConfig, MachineContext } from "./types.js";
2
+ import { State } from "./State.js";
3
+ import { NULL_EVENT } from "./constants.js";
4
+ import type { StateNode } from "./StateNode.js";
5
+ import { AnyActorContext, AnyHistoryValue, AnyState, AnyStateMachine, AnyStateNode, AnyTransitionDefinition, DelayedTransitionDefinition, InitialTransitionDefinition, StateFromMachine } from "./index.js";
6
6
  type Configuration<TContext extends MachineContext, TE extends EventObject> = Iterable<StateNode<TContext, TE>>;
7
7
  type AnyConfiguration = Configuration<any, any>;
8
8
  type AdjList = Map<AnyStateNode, Array<AnyStateNode>>;
@@ -1,4 +1,4 @@
1
- import { Compute, EventObject, IndexByType, IsNever, Prop, Values, IsAny, ActorMap, Cast, ParameterizedObject } from './types.ts';
1
+ import { Compute, EventObject, IndexByType, IsNever, Prop, Values, IsAny, ActorMap, Cast, ParameterizedObject } from "./types.js";
2
2
  export interface TypegenDisabled {
3
3
  '@@xstate/typegen': false;
4
4
  }
@@ -1,9 +1,9 @@
1
- import type { StateNode } from './StateNode.ts';
2
- import type { State } from './State.ts';
3
- import type { ActorStatus, Clock, Interpreter } from './interpreter.ts';
4
- import type { StateMachine } from './StateMachine.ts';
5
- import type { LifecycleSignal } from './actors/index.ts';
6
- import { TypegenDisabled, ResolveTypegenMeta, TypegenConstraint, MarkAllImplementationsAsProvided, AreAllImplementationsAssumedToBeProvided } from './typegenTypes.ts';
1
+ import type { StateNode } from "./StateNode.js";
2
+ import type { State } from "./State.js";
3
+ import type { ActorStatus, Clock, Interpreter } from "./interpreter.js";
4
+ import type { StateMachine } from "./StateMachine.js";
5
+ import type { LifecycleSignal } from "./actors/index.js";
6
+ import { TypegenDisabled, ResolveTypegenMeta, TypegenConstraint, MarkAllImplementationsAsProvided, AreAllImplementationsAssumedToBeProvided } from "./typegenTypes.js";
7
7
  export type AnyFunction = (...args: any[]) => any;
8
8
  type ReturnTypeOrValue<T> = T extends AnyFunction ? ReturnType<T> : T;
9
9
  export type IsNever<T> = [T] extends [never] ? true : false;
@@ -1,7 +1,7 @@
1
- import { AnyActorBehavior, AnyState } from './index.ts';
2
- import { NULL_EVENT } from './constants.ts';
3
- import type { StateNode } from './StateNode.ts';
4
- import type { ActorBehavior, AnyEventObject, EventObject, EventType, InvokeConfig, MachineContext, Mapper, Observer, PropertyMapper, ErrorEvent, SingleOrArray, StateLike, StateValue, Subscribable, TransitionConfig, TransitionConfigTarget } from './types.ts';
1
+ import { AnyActorBehavior, AnyState } from "./index.js";
2
+ import { NULL_EVENT } from "./constants.js";
3
+ import type { StateNode } from "./StateNode.js";
4
+ import type { ActorBehavior, AnyEventObject, EventObject, EventType, InvokeConfig, MachineContext, Mapper, Observer, PropertyMapper, ErrorEvent, SingleOrArray, StateLike, StateValue, Subscribable, TransitionConfig, TransitionConfigTarget } from "./types.js";
5
5
  export declare function keys<T extends object>(value: T): Array<keyof T & string>;
6
6
  export declare function matchesState(parentStateId: StateValue, childStateId: StateValue, delimiter?: string): boolean;
7
7
  export declare function toStatePath(stateId: string | string[], delimiter: string): string[];
@@ -1,4 +1,4 @@
1
- import { ActorRef, SnapshotFrom } from './types.ts';
1
+ import { ActorRef, SnapshotFrom } from "./types.js";
2
2
  interface WaitForOptions {
3
3
  /**
4
4
  * How long to wait before rejecting, if no emitted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xstate",
3
- "version": "5.0.0-beta.12",
3
+ "version": "5.0.0-beta.13",
4
4
  "description": "Finite State Machines and Statecharts for the Modern Web.",
5
5
  "main": "dist/xstate.cjs.js",
6
6
  "module": "dist/xstate.esm.js",