jssm 5.71.0 → 5.72.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 +37 -43
- package/dist/es6/jssm.d.ts +17 -1
- package/dist/es6/jssm.js +27 -12
- 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 +17 -1
- package/package.json +1 -1
package/jssm.d.ts
CHANGED
|
@@ -208,6 +208,7 @@ declare class Machine<mDT> {
|
|
|
208
208
|
_raw_state_declaration?: Array<Object>;
|
|
209
209
|
_state_declarations: Map<StateType, JssmStateDeclaration>;
|
|
210
210
|
_instance_name: string;
|
|
211
|
+
_data?: mDT;
|
|
211
212
|
_graph_layout: JssmLayout;
|
|
212
213
|
_dot_preamble: string;
|
|
213
214
|
_arrange_declaration: Array<Array<StateType>>;
|
|
@@ -232,7 +233,7 @@ declare class Machine<mDT> {
|
|
|
232
233
|
_main_transition_hook: HookHandler | undefined;
|
|
233
234
|
_forced_transition_hook: HookHandler | undefined;
|
|
234
235
|
_any_transition_hook: HookHandler | undefined;
|
|
235
|
-
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>);
|
|
236
|
+
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, data }: JssmGenericConfig<mDT>);
|
|
236
237
|
/********
|
|
237
238
|
*
|
|
238
239
|
* Internal method for fabricating states. Not meant for external use.
|
|
@@ -259,6 +260,21 @@ declare class Machine<mDT> {
|
|
|
259
260
|
*
|
|
260
261
|
*/
|
|
261
262
|
state(): StateType;
|
|
263
|
+
/*********
|
|
264
|
+
*
|
|
265
|
+
* Get the current data of a machine.
|
|
266
|
+
*
|
|
267
|
+
* ```typescript
|
|
268
|
+
* import * as jssm from 'jssm';
|
|
269
|
+
*
|
|
270
|
+
* const switch = jssm.from('on <=> off;', {data: 1});
|
|
271
|
+
* console.log( switch.data() ); // 1
|
|
272
|
+
* ```
|
|
273
|
+
*
|
|
274
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
275
|
+
*
|
|
276
|
+
*/
|
|
277
|
+
data(): mDT;
|
|
262
278
|
/********
|
|
263
279
|
*
|
|
264
280
|
* Check whether a given state is final (either has no exits or is marked
|