import { StateMachine } from "./StateMachine.js"; import { ResolvedStateMachineTypes, TODO } from "./types.js"; import { AnyActorRef, EventObject, AnyEventObject, Cast, InternalMachineImplementations, MachineConfig, MachineContext, MachineTypes, NonReducibleUnknown, ParameterizedObject, ProvidedActor, StateValue, ToChildren, MetaObject } from "./types.js"; /** * Creates a state machine (statechart) with the given configuration. * * The state machine represents the pure logic of a state machine actor. * * @example * * ```ts * import { createMachine } from 'xstate'; * * const lightMachine = createMachine({ * id: 'light', * initial: 'green', * states: { * green: { * on: { * TIMER: { target: 'yellow' } * } * }, * yellow: { * on: { * TIMER: { target: 'red' } * } * }, * red: { * on: { * TIMER: { target: 'green' } * } * } * } * }); * * const lightActor = createActor(lightMachine); * lightActor.start(); * * lightActor.send({ type: 'TIMER' }); * ``` * * @param config The state machine configuration. * @param options DEPRECATED: use `setup({ ... })` or `machine.provide({ ... })` * to provide machine implementations instead. */ export declare function createMachine(config: { types?: MachineTypes; schemas?: unknown; } & MachineConfig, implementations?: InternalMachineImplementations>): StateMachine, Record>, TActor, TAction, TGuard, TDelay, StateValue, TTag & string, TInput, TOutput, TEmitted, TMeta, // TMeta TODO>;