Open phpstudyone opened 4 years ago
The data type of the status value is not allowed to be int?
const StateMachine = require('javascript-state-machine'); var fsm = new StateMachine({ init: 1, transitions: [ { name: 'melt', from: 1, to: 2 }, { name: 'freeze', from: 2, to:3 }, { name: 'vaporize', from: 3, to: 4 }, { name: 'condense', from: 4, to: 5 } ], methods: { onMelt: function(t) { console.log('I melted',t,this) }, onFreeze: function() { console.log('I froze') }, onVaporize: function() { console.log('I vaporized') }, onCondense: function() { console.log('I condensed') } } }); fsm.melt();
I'm also facing the same issue
The data type of the status value is not allowed to be int?