TypeScript in example

This commit is contained in:
Brian Sakal
2023-05-08 21:09:20 -04:00
parent abf984bd5d
commit 8806ce48d7
+2 -2
View File
@@ -3,10 +3,10 @@ import { Machine, State, On, Do, Goto, Spawn, Unspawn } from '../index';
const beginTimer = ()=>{};
type S = 'green' | 'yellow' | 'red';
type E = 'entry' | 'timer-finished';
type E = ['entry',null] | ['timer-finished',null];
const machine =
Machine(
Machine<S,E>(
State('green',
On('entry',
Do(beginTimer)