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/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}.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.77.0",
3
+ "version": "5.77.1",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },