jssm 5.65.3 → 5.65.4

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
@@ -82,13 +82,15 @@ declare function arrow_right_kind(arrow: JssmArrow): JssmArrowKind;
82
82
  * operator `sm`, and mostly falls back to `.from` when needing to parse
83
83
  * strings dynamically instead of from template literals.
84
84
  *
85
+ * Operator {@link sm}:
86
+ *
85
87
  * ```typescript
86
88
  * import { sm } from './jssm';
87
89
  *
88
90
  * const switch = sm`on <=> off;`;
89
91
  * ```
90
92
  *
91
- * &hellip; or &hellip;
93
+ * Method {@link from}:
92
94
  *
93
95
  * ```typescript
94
96
  * import * as jssm from './jssm';
@@ -131,13 +133,15 @@ declare function wrap_parse(input: string, options?: Object): any;
131
133
  * operator `sm`, and mostly falls back to `.from` when needing to parse
132
134
  * strings dynamically instead of from template literals.
133
135
  *
136
+ * Operator {@link sm}:
137
+ *
134
138
  * ```typescript
135
139
  * import { sm } from './jssm';
136
140
  *
137
141
  * const switch = sm`on <=> off;`;
138
142
  * ```
139
143
  *
140
- * &hellip; or &hellip;
144
+ * Method {@link from}:
141
145
  *
142
146
  * ```typescript
143
147
  * import * as jssm from './jssm';
@@ -281,6 +285,39 @@ declare class Machine<mDT> {
281
285
  instance_name(): string | undefined;
282
286
  sm(template_strings: TemplateStringsArray, ...remainder: any[]): Machine<mDT>;
283
287
  }
288
+ /*********
289
+ *
290
+ * Create a state machine from a template string. This is one of the two main
291
+ * paths for working with JSSM, alongside {@link from}.
292
+ *
293
+ * Use this method when you want to work directly and conveniently with a
294
+ * constant template expression. Use `.from` when you want to pull from
295
+ * dynamic strings.
296
+ *
297
+ *
298
+ * ```typescript
299
+ * import * as jssm from './jssm';
300
+ *
301
+ * const switch = jssm.from('on <=> off;');
302
+ * ```
303
+ *
304
+ */
284
305
  declare function sm<mDT>(template_strings: TemplateStringsArray, ...remainder: any[]): Machine<mDT>;
306
+ /*********
307
+ *
308
+ * Create a state machine from an implementation string. This is one of the
309
+ * two main paths for working with JSSM, alongside {@link sm}.
310
+ *
311
+ * Use this method when you want to conveniently pull a state machine from a
312
+ * string dynamically. Use operator `sm` when you just want to work with a
313
+ * template expression.
314
+ *
315
+ * ```typescript
316
+ * import * as jssm from './jssm';
317
+ *
318
+ * const switch = jssm.from('on <=> off;');
319
+ * ```
320
+ *
321
+ */
285
322
  declare function from<mDT>(MachineAsString: string, ExtraConstructorFields?: Partial<JssmGenericConfig<mDT>> | undefined): Machine<mDT>;
286
323
  export { version, transfer_state_properties, Machine, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind, seq, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key, shapes, gviz_shapes, named_colors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.65.3",
3
+ "version": "5.65.4",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },