state-switch
Version:
State Switch is a Change Monitor/Guarder for Async Actions.
28 lines • 778 B
TypeScript
/**
* @see https://huan.github.io/state-switch/
*/
import type { MachineConfig } from 'xstate';
interface ServiceCtlEvent {
type: 'START' | 'STOP' | 'RESET' | 'CANCEL';
}
interface ServiceCtlAction {
type: never;
}
interface ServiceCtlState {
states: {
active: {};
inactive: {};
resetting: {};
starting: {};
stopping: {};
canceled: {};
};
}
declare const initialContext: () => {
counter: number;
};
declare type ServiceCtlContext = ReturnType<typeof initialContext>;
declare const config: MachineConfig<ServiceCtlContext, ServiceCtlState, ServiceCtlEvent>;
export type { ServiceCtlAction, ServiceCtlContext, ServiceCtlEvent, ServiceCtlState, };
export { config };
//# sourceMappingURL=machine-config.d.ts.map