jssm 5.77.0 → 5.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -17
- package/README.md +2 -2
- package/dist/es6/jssm.d.ts +21 -1
- package/dist/es6/jssm.js +23 -1
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/jssm.d.ts +21 -1
- package/package.json +1 -1
package/jssm.d.ts
CHANGED
|
@@ -665,7 +665,7 @@ declare class Machine<mDT> {
|
|
|
665
665
|
set history_length(to: number);
|
|
666
666
|
/********
|
|
667
667
|
*
|
|
668
|
-
* Instruct the machine to complete an action.
|
|
668
|
+
* Instruct the machine to complete an action. Synonym for {@link do}.
|
|
669
669
|
*
|
|
670
670
|
* ```typescript
|
|
671
671
|
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
@@ -683,6 +683,26 @@ declare class Machine<mDT> {
|
|
|
683
683
|
*
|
|
684
684
|
*/
|
|
685
685
|
action(actionName: StateType, newData?: mDT): boolean;
|
|
686
|
+
/********
|
|
687
|
+
*
|
|
688
|
+
* Instruct the machine to complete an action. Synonym for {@link action}.
|
|
689
|
+
*
|
|
690
|
+
* ```typescript
|
|
691
|
+
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
692
|
+
*
|
|
693
|
+
* light.state(); // 'red'
|
|
694
|
+
* light.do('next'); // true
|
|
695
|
+
* light.state(); // 'green'
|
|
696
|
+
* ```
|
|
697
|
+
*
|
|
698
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
699
|
+
*
|
|
700
|
+
* @param actionName The action to engage
|
|
701
|
+
*
|
|
702
|
+
* @param newData The data change to insert during the action
|
|
703
|
+
*
|
|
704
|
+
*/
|
|
705
|
+
do(actionName: StateType, newData?: mDT): boolean;
|
|
686
706
|
/********
|
|
687
707
|
*
|
|
688
708
|
* Instruct the machine to complete a transition. Synonym for {@link go}.
|