import { Model } from './model.types' ; import { StateNode } from './StateNode' ; import { AnyEventObject , DefaultContext , EventObject , MachineConfig , MachineOptions , StateMachine , StateSchema , Typestate } from './types' ; deprecated export function Machine < TContext = any , TEvent extends EventObject = AnyEventObject > ( config , options ? , initialContext ? ) ; export function Machine < TContext = DefaultContext , TStateSchema extends StateSchema = any , TEvent extends EventObject = AnyEventObject > ( config , options ? , initialContext ? ) ; export function Machine < TContext = DefaultContext , TStateSchema extends StateSchema = any , TEvent extends EventObject = AnyEventObject > ( config , options ? , initialContext = config . context ) { return new StateNode < TContext , TStateSchema , TEvent > ( config , options , initialContext ) as StateMachine < TContext , TStateSchema , TEvent > ; } export function createMachine < TContext , TEvent extends EventObject = AnyEventObject , TTypestate extends Typestate < TContext > = { value : any ; context : TContext ; } > ( config , options ? ) ; export function createMachine < TContext , TEvent extends EventObject = AnyEventObject , TTypestate extends Typestate < TContext > = { value : any ; context : TContext ; } > ( config , options ? ) { return new StateNode < TContext , any , TEvent , TTypestate > ( config , options ) as StateMachine < TContext , any , TEvent , TTypestate > ; }