Create a state machine from a template string. This is one of the two main
paths for working with JSSM, alongside from.
Use this method when you want to work directly and conveniently with a
constant template expression. Use .from when you want to pull from
dynamic strings.
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 a template string. This is one of the two main paths for working with JSSM, alongside from.
Use this method when you want to work directly and conveniently with a constant template expression. Use
.fromwhen you want to pull from dynamic strings.