jssm 5.46.0 → 5.47.0
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/dist/es6/jssm.d.ts +1 -0
- package/dist/es6/jssm.js +5 -0
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/jssm.d.ts +1 -0
- package/package.json +1 -1
package/dist/es6/jssm.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ declare class Machine<mDT> {
|
|
|
91
91
|
has_completes(): boolean;
|
|
92
92
|
set_hook(HookDesc: HookDescription): void;
|
|
93
93
|
hook(from: string, to: string, handler: HookHandler): Machine<mDT>;
|
|
94
|
+
hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
|
|
94
95
|
action(name: StateType, newData?: mDT): boolean;
|
|
95
96
|
transition(newState: StateType, newData?: mDT): boolean;
|
|
96
97
|
force_transition(newState: StateType, newData?: mDT): boolean;
|
package/dist/es6/jssm.js
CHANGED
|
@@ -725,6 +725,11 @@ class Machine {
|
|
|
725
725
|
this.set_hook({ kind: 'hook', from, to, handler });
|
|
726
726
|
return this;
|
|
727
727
|
}
|
|
728
|
+
hook_action(from, to, action, handler) {
|
|
729
|
+
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
730
|
+
this.set_hook({ kind: 'named', from, to, action, handler });
|
|
731
|
+
return this;
|
|
732
|
+
}
|
|
728
733
|
// remove_hook(HookDesc: HookDescription) {
|
|
729
734
|
// throw 'TODO: Should remove hook here';
|
|
730
735
|
// }
|
package/dist/es6/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const version = "5.
|
|
1
|
+
const version = "5.47.0";
|
|
2
2
|
export { version };
|