import { StateMachine } from "./StateMachine.js"; import { ResolveTypegenMeta, TypegenConstraint, TypegenDisabled } from "./typegenTypes.js"; import { AnyActorRef, EventObject, AnyEventObject, Cast, InternalMachineImplementations, IsNever, MachineConfig, MachineContext, MachineTypes, NonReducibleUnknown, ParameterizedObject, Prop, ProvidedActor, StateValue, ToChildren } from "./types.js"; type TestValue = string | { [k: string]: TestValue | undefined; }; type _GroupTestValues = TTestValue extends string ? TTestValue extends `${string}.${string}` ? [never, never] : [TTestValue, never] : [never, TTestValue]; type GroupTestValues = { leafCandidates: _GroupTestValues[0]; nonLeaf: _GroupTestValues[1]; }; type FilterLeafValues = IsNever extends true ? TLeafCandidate : TLeafCandidate extends string ? TLeafCandidate extends keyof TNonLeaf ? never : TLeafCandidate : never; type ToStateValue = FilterLeafValues['leafCandidates'], GroupTestValues['nonLeaf']> | (IsNever['nonLeaf']> extends false ? { [K in keyof GroupTestValues['nonLeaf']]: ToStateValue['nonLeaf'][K]>>; } : never); /** * Creates a state machine (statechart) with the given configuration. * * The state machine represents the pure logic of a state machine actor. * * @param config The state machine configuration. * @param options DEPRECATED: use `setup({ ... })` or `machine.provide({ ... })` to provide machine implementations instead. * * @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' }); ``` */ export declare function createMachine(config: { types?: MachineTypes; schemas?: unknown; } & MachineConfig, implementations?: InternalMachineImplementations>): StateMachine, Record>, TActor, TAction, TGuard, TDelay, 'matchesStates' extends keyof TTypesMeta ? ToStateValue> : StateValue, Prop['resolved'], 'tags'> & string, TInput, TOutput, TEmitted, ResolveTypegenMeta>; export {};