jssm 5.65.8 → 5.65.9
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 +36 -0
- package/dist/es6/jssm.js +36 -0
- 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 +36 -0
- package/package.json +1 -1
package/dist/es6/jssm.d.ts
CHANGED
|
@@ -213,6 +213,11 @@ declare class Machine<mDT> {
|
|
|
213
213
|
_forced_transition_hook: HookHandler | undefined;
|
|
214
214
|
_any_transition_hook: HookHandler | undefined;
|
|
215
215
|
constructor({ start_states, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, fsl_version, dot_preamble, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout, instance_name }: JssmGenericConfig<mDT>);
|
|
216
|
+
/********
|
|
217
|
+
*
|
|
218
|
+
* Internal method for fabricating states. Not meant for external use.
|
|
219
|
+
*
|
|
220
|
+
*/
|
|
216
221
|
_new_state(state_config: JssmGenericState): StateType;
|
|
217
222
|
/*********
|
|
218
223
|
*
|
|
@@ -230,7 +235,38 @@ declare class Machine<mDT> {
|
|
|
230
235
|
*
|
|
231
236
|
*/
|
|
232
237
|
state(): StateType;
|
|
238
|
+
/********
|
|
239
|
+
*
|
|
240
|
+
* Check whether a given state is final (either has no exits or is marked
|
|
241
|
+
* `complete`.)
|
|
242
|
+
*
|
|
243
|
+
* ```typescript
|
|
244
|
+
* import { sm, state_is_final } from './jssm';
|
|
245
|
+
*
|
|
246
|
+
* const final_test = sm`first -> second;`;
|
|
247
|
+
*
|
|
248
|
+
* console.log( final_test.state_is_final('first') ); // false
|
|
249
|
+
* console.log( final_test.state_is_final('second') ); // true
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
233
253
|
state_is_final(whichState: StateType): boolean;
|
|
254
|
+
/********
|
|
255
|
+
*
|
|
256
|
+
* Check whether the current state is final (either has no exits or is marked
|
|
257
|
+
* `complete`.)
|
|
258
|
+
*
|
|
259
|
+
* ```typescript
|
|
260
|
+
* import { sm, state_is_final } from './jssm';
|
|
261
|
+
*
|
|
262
|
+
* const final_test = sm`first -> second;`;
|
|
263
|
+
*
|
|
264
|
+
* console.log( final_test.is_final() ); // false
|
|
265
|
+
* state.transition('second');
|
|
266
|
+
* console.log( final_test.is_final() ); // true
|
|
267
|
+
* ```
|
|
268
|
+
*
|
|
269
|
+
*/
|
|
234
270
|
is_final(): boolean;
|
|
235
271
|
graph_layout(): string;
|
|
236
272
|
dot_preamble(): string;
|
package/dist/es6/jssm.js
CHANGED
|
@@ -643,6 +643,11 @@ class Machine {
|
|
|
643
643
|
}
|
|
644
644
|
});
|
|
645
645
|
}
|
|
646
|
+
/********
|
|
647
|
+
*
|
|
648
|
+
* Internal method for fabricating states. Not meant for external use.
|
|
649
|
+
*
|
|
650
|
+
*/
|
|
646
651
|
_new_state(state_config) {
|
|
647
652
|
if (this._states.has(state_config.name)) {
|
|
648
653
|
throw new JssmError(this, `state ${JSON.stringify(state_config.name)} already exists`);
|
|
@@ -675,9 +680,40 @@ class Machine {
|
|
|
675
680
|
return true; // todo whargarbl
|
|
676
681
|
}
|
|
677
682
|
*/
|
|
683
|
+
/********
|
|
684
|
+
*
|
|
685
|
+
* Check whether a given state is final (either has no exits or is marked
|
|
686
|
+
* `complete`.)
|
|
687
|
+
*
|
|
688
|
+
* ```typescript
|
|
689
|
+
* import { sm, state_is_final } from './jssm';
|
|
690
|
+
*
|
|
691
|
+
* const final_test = sm`first -> second;`;
|
|
692
|
+
*
|
|
693
|
+
* console.log( final_test.state_is_final('first') ); // false
|
|
694
|
+
* console.log( final_test.state_is_final('second') ); // true
|
|
695
|
+
* ```
|
|
696
|
+
*
|
|
697
|
+
*/
|
|
678
698
|
state_is_final(whichState) {
|
|
679
699
|
return ((this.state_is_terminal(whichState)) && (this.state_is_complete(whichState)));
|
|
680
700
|
}
|
|
701
|
+
/********
|
|
702
|
+
*
|
|
703
|
+
* Check whether the current state is final (either has no exits or is marked
|
|
704
|
+
* `complete`.)
|
|
705
|
+
*
|
|
706
|
+
* ```typescript
|
|
707
|
+
* import { sm, state_is_final } from './jssm';
|
|
708
|
+
*
|
|
709
|
+
* const final_test = sm`first -> second;`;
|
|
710
|
+
*
|
|
711
|
+
* console.log( final_test.is_final() ); // false
|
|
712
|
+
* state.transition('second');
|
|
713
|
+
* console.log( final_test.is_final() ); // true
|
|
714
|
+
* ```
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
681
717
|
is_final() {
|
|
682
718
|
// return ((!this.is_changing()) && this.state_is_final(this.state()));
|
|
683
719
|
return this.state_is_final(this.state());
|
package/dist/es6/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const version = "5.65.
|
|
1
|
+
const version = "5.65.9";
|
|
2
2
|
export { version };
|