export declare type StateChart = { initial: State; context: Context; states: Record>; }; declare type StateDefinition = { onEnterState?: (transitionFn: TransitionFn) => void; onLeaveState?: (transitionFn: TransitionFn) => void; on?: { [index in Event]?: State; }; }; export declare type TransitionFn = (event: Event, context?: Context) => void; export declare function createStateMachine(stateChart: StateChart, { debug, warnOnUnknownTransitions }?: { debug?: boolean | undefined; warnOnUnknownTransitions?: boolean | undefined; }): { subscribe: (callback: (state: State, context: Context) => void) => () => void; transition: TransitionFn; getState: () => State; getContext: () => Context; }; export {};