TypeScript in example

main
Brian Sakal 2 years ago
parent abf984bd5d
commit 8806ce48d7

@ -3,10 +3,10 @@ import { Machine, State, On, Do, Goto, Spawn, Unspawn } from '../index';
const beginTimer = ()=>{}; const beginTimer = ()=>{};
type S = 'green' | 'yellow' | 'red'; type S = 'green' | 'yellow' | 'red';
type E = 'entry' | 'timer-finished'; type E = ['entry',null] | ['timer-finished',null];
const machine = const machine =
Machine( Machine<S,E>(
State('green', State('green',
On('entry', On('entry',
Do(beginTimer) Do(beginTimer)

Loading…
Cancel
Save