Skip to content

Instantly share code, notes, and snippets.

@pveglia
pveglia / example.ts
Created November 13, 2017 22:58
State machine in typescript
import {State, StateMachine, Transition} from './state-machine';
console.log('hey');
const stateMachine = new StateMachine(
{
'initial': {
onEnter: (input: any) => {
console.log('entering initial');
input.state = 'initial';

Keybase proof

I hereby claim:

  • I am pveglia on github.
  • I am pveglia (https://keybase.io/pveglia) on keybase.
  • I have a public key ASAk0a8tVtAfVaLsTFO77vVKMBdX9pprBcm7pjpGsNGX_Ao

To claim this, I am signing this object: