Skip to content

Instantly share code, notes, and snippets.

@wegry
Last active January 5, 2021 15:27
Show Gist options
  • Save wegry/eaec7d5a932e45e57578204a5df70f25 to your computer and use it in GitHub Desktop.
Save wegry/eaec7d5a932e45e57578204a5df70f25 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// To see it in action https://xstate.js.org/viz/
// Since this snippet isn't functioning on its own, turn off some rules
/* eslint-disable new-cap, @typescript-eslint/ban-ts-comment */
// @ts-nocheck
Machine({
id: 'starting',
initial: 'starting',
states: {
build: {
initial: 'building',
type: 'parallel',
states: {
building: {
on: {
FAILURE: 'failed-building',
SUCCESS: 'built',
},
},
built: {
type: 'final',
},
'failed-building': {
type: 'final',
},
},
},
'failed-deploy': {},
starting: {
on: {},
},
running: {
on: {
CONFIG_CHANGE: 'build',
ON_24HRS_SINCE_CREATION: 'stopped',
},
},
stopped: {},
unknown: {
type: 'final',
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment