TypeScript in example
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user