Create a state machine from an implementation string. This is one of the
two main paths for working with JSSM, alongside sm.
Use this method when you want to conveniently pull a state machine from a
string dynamically. Use operator sm when you just want to work with a
template expression.
import*asjssmfrom'jssm';
constlswitch = jssm.from('on <=> off;');
Type Parameters
mDT
The type of the machine data member; usually omitted
Create a state machine from an implementation string. This is one of the two main paths for working with JSSM, alongside sm.
Use this method when you want to conveniently pull a state machine from a string dynamically. Use operator
smwhen you just want to work with a template expression.