jssm 5.56.1 → 5.56.2

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.
@@ -98,6 +98,7 @@ declare class Machine<mDT> {
98
98
  hook(from: string, to: string, handler: HookHandler): Machine<mDT>;
99
99
  hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
100
100
  hook_any_transition(handler: HookHandler): Machine<mDT>;
101
+ hook_entry(to: string, handler: HookHandler): Machine<mDT>;
101
102
  transition_impl(newStateOrAction: StateType, newData: mDT | undefined, wasForced: boolean, wasAction: boolean): boolean;
102
103
  action(actionName: StateType, newData?: mDT): boolean;
103
104
  transition(newState: StateType, newData?: mDT): boolean;
package/dist/es6/jssm.js CHANGED
@@ -747,6 +747,11 @@ class Machine {
747
747
  this.set_hook({ kind: 'any transition', handler });
748
748
  return this;
749
749
  }
750
+ hook_entry(to, handler) {
751
+ // TODO: should this throw if setting the hook fails, or ignore it and continue?
752
+ this.set_hook({ kind: 'entry', to, handler });
753
+ return this;
754
+ }
750
755
  // remove_hook(HookDesc: HookDescription) {
751
756
  // throw 'TODO: Should remove hook here';
752
757
  // }
@@ -1,2 +1,2 @@
1
- const version = "5.56.0";
1
+ const version = "5.56.2";
2
2
  export { version };