statewave
Version:
Another Finite State Machine
22 lines • 561 B
TypeScript
export declare type Immediate<S> = () => {
__immediate: boolean;
state: S;
};
export declare type Transition<S, E> = () => {
__transition: boolean;
event: E;
state: S;
};
export declare type State<S, E> = () => {
__state: boolean;
transitions: Transition<S, E>[];
immediates: Immediate<S>[];
};
export declare type MachineState<S extends string | number | symbol, E> = {
[K in S]?: State<S, E>;
};
export declare type MachineConfig<S> = {
initial?: S;
type?: "parallel" | "map";
};
//# sourceMappingURL=types.d.ts.map