jssm 5.162.1 → 5.162.3
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/README.md +3 -3
- package/dist/cdn/instance.js +1 -1
- package/dist/cdn/viz.js +1 -1
- package/dist/cli/fsl-export-system-prompt.cjs +1 -1
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/cli/lib.cjs +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/deno/README.md +3 -3
- package/dist/deno/jssm.d.ts +60 -59
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_compiler.d.ts +5 -5
- package/dist/deno/jssm_types.d.ts +21 -21
- package/dist/deno/jssm_viz.d.ts +1 -1
- package/dist/fence/fence.js +58 -58
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/jssm.es5.d.cts +82 -81
- package/jssm.es6.d.ts +82 -81
- package/jssm.fence.d.ts +72 -71
- package/jssm_viz.es5.d.cts +73 -72
- package/jssm_viz.es6.d.ts +73 -72
- package/package.json +1 -1
package/dist/deno/README.md
CHANGED
|
@@ -18,10 +18,10 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
* Generated for version 5.162.
|
|
21
|
+
* Generated for version 5.162.3 at 7/10/2026, 6:50:14 AM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
|
-
# jssm 5.162.
|
|
24
|
+
# jssm 5.162.3
|
|
25
25
|
|
|
26
26
|
[**Try the live editor**](https://stonecypher.github.io/jssm-viz-demo/graph_explorer.html) ·
|
|
27
27
|
[Documentation](https://stonecypher.github.io/jssm/docs/) ·
|
|
@@ -469,7 +469,7 @@ If your contribution is missing here, please open an issue.
|
|
|
469
469
|
***8,032 tests***, run 83,074 times.
|
|
470
470
|
|
|
471
471
|
- 7,274 specs with 100.0% coverage
|
|
472
|
-
- 758 fuzz tests with 48.
|
|
472
|
+
- 758 fuzz tests with 48.1% coverage
|
|
473
473
|
- 10,711 TypeScript lines - 0.7 tests per line, 7.8 generated tests per line
|
|
474
474
|
|
|
475
475
|
[](https://github.com/StoneCypher/jssm/actions)
|
package/dist/deno/jssm.d.ts
CHANGED
|
@@ -237,7 +237,7 @@ declare class Machine<mDT> {
|
|
|
237
237
|
* console.log( lswitch.state() ); // 'off'
|
|
238
238
|
* ```
|
|
239
239
|
*
|
|
240
|
-
* @
|
|
240
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
241
241
|
*
|
|
242
242
|
* @returns The current state name.
|
|
243
243
|
*
|
|
@@ -257,7 +257,7 @@ declare class Machine<mDT> {
|
|
|
257
257
|
*
|
|
258
258
|
* See also {@link display_text}.
|
|
259
259
|
*
|
|
260
|
-
* @
|
|
260
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
261
261
|
*
|
|
262
262
|
* @param state The state to get the label for.
|
|
263
263
|
*
|
|
@@ -284,7 +284,7 @@ declare class Machine<mDT> {
|
|
|
284
284
|
* console.log( lswitch.display_text('b') ); // 'b'
|
|
285
285
|
* ```
|
|
286
286
|
*
|
|
287
|
-
* @
|
|
287
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
288
288
|
*
|
|
289
289
|
* @param state The state to get display text for.
|
|
290
290
|
*
|
|
@@ -303,7 +303,7 @@ declare class Machine<mDT> {
|
|
|
303
303
|
* console.log( lswitch.data() ); // 1
|
|
304
304
|
* ```
|
|
305
305
|
*
|
|
306
|
-
* @
|
|
306
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
307
307
|
*
|
|
308
308
|
* @returns A deep clone of the machine's current data value.
|
|
309
309
|
*
|
|
@@ -467,7 +467,7 @@ declare class Machine<mDT> {
|
|
|
467
467
|
* console.log( final_test.is_start_state('b') ); // true
|
|
468
468
|
* ```
|
|
469
469
|
*
|
|
470
|
-
* @
|
|
470
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
471
471
|
*
|
|
472
472
|
* @param whichState The name of the state to check
|
|
473
473
|
*
|
|
@@ -492,7 +492,7 @@ declare class Machine<mDT> {
|
|
|
492
492
|
* console.log( final_test.is_start_state('b') ); // true
|
|
493
493
|
* ```
|
|
494
494
|
*
|
|
495
|
-
* @
|
|
495
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
496
496
|
*
|
|
497
497
|
* @param whichState The name of the state to check
|
|
498
498
|
*
|
|
@@ -545,7 +545,7 @@ declare class Machine<mDT> {
|
|
|
545
545
|
* console.log( final_test.state_is_final('second') ); // true
|
|
546
546
|
* ```
|
|
547
547
|
*
|
|
548
|
-
* @
|
|
548
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
549
549
|
*
|
|
550
550
|
* @param whichState The name of the state to check for finality
|
|
551
551
|
*
|
|
@@ -573,9 +573,9 @@ declare class Machine<mDT> {
|
|
|
573
573
|
* Serialize the current machine, including all defining state but not the
|
|
574
574
|
* machine string, to a structure. This means you will need the machine
|
|
575
575
|
* string to recreate (to not waste repeated space;) if you want the machine
|
|
576
|
-
* string embedded, call
|
|
576
|
+
* string embedded, call `serialize_with_string` instead.
|
|
577
577
|
*
|
|
578
|
-
* @
|
|
578
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
579
579
|
*
|
|
580
580
|
* @param comment An optional comment string to embed in the serialized
|
|
581
581
|
* output for identification or debugging.
|
|
@@ -735,7 +735,7 @@ declare class Machine<mDT> {
|
|
|
735
735
|
* console.log( lswitch.states() ); // ['on', 'off']
|
|
736
736
|
* ```
|
|
737
737
|
*
|
|
738
|
-
* @
|
|
738
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
739
739
|
*
|
|
740
740
|
* @returns An array of all state names in the machine.
|
|
741
741
|
*
|
|
@@ -760,7 +760,7 @@ declare class Machine<mDT> {
|
|
|
760
760
|
* console.log( lswitch.has_state('dance') ); // false
|
|
761
761
|
* ```
|
|
762
762
|
*
|
|
763
|
-
* @
|
|
763
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
764
764
|
*
|
|
765
765
|
* @param whichState The state to be checked for existence.
|
|
766
766
|
*
|
|
@@ -798,7 +798,7 @@ declare class Machine<mDT> {
|
|
|
798
798
|
* ]
|
|
799
799
|
* ```
|
|
800
800
|
*
|
|
801
|
-
* @
|
|
801
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
802
802
|
*
|
|
803
803
|
* @returns An array of all {@link JssmTransition} edge objects.
|
|
804
804
|
*
|
|
@@ -949,7 +949,7 @@ declare class Machine<mDT> {
|
|
|
949
949
|
* light.list_transitions(); // { entrances: [ 'yellow', 'off' ], exits: [ 'green', 'off' ] }
|
|
950
950
|
* ```
|
|
951
951
|
*
|
|
952
|
-
* @
|
|
952
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
953
953
|
*
|
|
954
954
|
* @param whichState The state whose transitions to have listed
|
|
955
955
|
*
|
|
@@ -960,7 +960,7 @@ declare class Machine<mDT> {
|
|
|
960
960
|
* List all entrances attached to the current state. Please note that the
|
|
961
961
|
* order of the list is not defined. This list includes both unforced and
|
|
962
962
|
* forced entrances; if this isn't desired, consider
|
|
963
|
-
*
|
|
963
|
+
* `list_unforced_entrances` or `list_forced_entrances` as
|
|
964
964
|
* appropriate.
|
|
965
965
|
*
|
|
966
966
|
* ```typescript
|
|
@@ -972,7 +972,7 @@ declare class Machine<mDT> {
|
|
|
972
972
|
* light.list_entrances(); // [ 'yellow', 'off' ]
|
|
973
973
|
* ```
|
|
974
974
|
*
|
|
975
|
-
* @
|
|
975
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
976
976
|
*
|
|
977
977
|
* @param whichState The state whose entrances to have listed
|
|
978
978
|
*
|
|
@@ -982,8 +982,8 @@ declare class Machine<mDT> {
|
|
|
982
982
|
*
|
|
983
983
|
* List all exits attached to the current state. Please note that the order
|
|
984
984
|
* of the list is not defined. This list includes both unforced and forced
|
|
985
|
-
* exits; if this isn't desired, consider
|
|
986
|
-
*
|
|
985
|
+
* exits; if this isn't desired, consider `list_unforced_exits` or
|
|
986
|
+
* `list_forced_exits` as appropriate.
|
|
987
987
|
*
|
|
988
988
|
* ```typescript
|
|
989
989
|
* import { sm } from 'jssm';
|
|
@@ -994,7 +994,7 @@ declare class Machine<mDT> {
|
|
|
994
994
|
* light.list_exits(); // [ 'green', 'off' ]
|
|
995
995
|
* ```
|
|
996
996
|
*
|
|
997
|
-
* @
|
|
997
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
998
998
|
*
|
|
999
999
|
* @param whichState The state whose exits to have listed
|
|
1000
1000
|
*
|
|
@@ -1132,7 +1132,7 @@ declare class Machine<mDT> {
|
|
|
1132
1132
|
* console.log( machine.actions() ); // logs ['next', 'shutdown']
|
|
1133
1133
|
* ```
|
|
1134
1134
|
*
|
|
1135
|
-
* @
|
|
1135
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1136
1136
|
*
|
|
1137
1137
|
* @param whichState The state whose actions to list. Defaults to the
|
|
1138
1138
|
* current state.
|
|
@@ -1158,7 +1158,7 @@ declare class Machine<mDT> {
|
|
|
1158
1158
|
* console.log( machine.list_states_having_action('start') ); // ['off']
|
|
1159
1159
|
* ```
|
|
1160
1160
|
*
|
|
1161
|
-
* @
|
|
1161
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1162
1162
|
*
|
|
1163
1163
|
* @param whichState The action to be checked for associated states
|
|
1164
1164
|
*
|
|
@@ -1231,7 +1231,7 @@ declare class Machine<mDT> {
|
|
|
1231
1231
|
* m.isIn('nonesuch'); // false — undeclared group has no members
|
|
1232
1232
|
* ```
|
|
1233
1233
|
*
|
|
1234
|
-
* @
|
|
1234
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1235
1235
|
*
|
|
1236
1236
|
* @param groupName The group to test the current state against.
|
|
1237
1237
|
*
|
|
@@ -1259,7 +1259,7 @@ declare class Machine<mDT> {
|
|
|
1259
1259
|
* m.groupsOf('z'); // Set {} — not in any group
|
|
1260
1260
|
* ```
|
|
1261
1261
|
*
|
|
1262
|
-
* @
|
|
1262
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1263
1263
|
*
|
|
1264
1264
|
* @param state The state whose containing groups are wanted.
|
|
1265
1265
|
*
|
|
@@ -1285,7 +1285,7 @@ declare class Machine<mDT> {
|
|
|
1285
1285
|
* m.groups(); // [ 'first', 'second' ]
|
|
1286
1286
|
* ```
|
|
1287
1287
|
*
|
|
1288
|
-
* @
|
|
1288
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1289
1289
|
*
|
|
1290
1290
|
* @returns The declared group names, in declaration order.
|
|
1291
1291
|
*
|
|
@@ -1308,7 +1308,7 @@ declare class Machine<mDT> {
|
|
|
1308
1308
|
* m.statesIn('inner'); // [ 'a', 'b' ]
|
|
1309
1309
|
* ```
|
|
1310
1310
|
*
|
|
1311
|
-
* @
|
|
1311
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1312
1312
|
*
|
|
1313
1313
|
* @param groupName The group whose transitive member states are wanted.
|
|
1314
1314
|
*
|
|
@@ -1356,11 +1356,11 @@ declare class Machine<mDT> {
|
|
|
1356
1356
|
* off(); // unsubscribe
|
|
1357
1357
|
* ```
|
|
1358
1358
|
*
|
|
1359
|
-
* @
|
|
1359
|
+
* @typeParam Ev The event name (drives the detail type).
|
|
1360
1360
|
* @param name The event name to subscribe to.
|
|
1361
|
-
* @param
|
|
1362
|
-
*
|
|
1363
|
-
*
|
|
1361
|
+
* @param handler The handler invoked on each matching delivery. The
|
|
1362
|
+
* three-argument `(name, filter, handler)` form inserts a
|
|
1363
|
+
* filter object before the handler (see the example above).
|
|
1364
1364
|
* @returns A function that unsubscribes when called.
|
|
1365
1365
|
*
|
|
1366
1366
|
* @see Machine.off
|
|
@@ -1377,10 +1377,11 @@ declare class Machine<mDT> {
|
|
|
1377
1377
|
* m.once('terminal', e => console.log(`done at ${e.state}`));
|
|
1378
1378
|
* ```
|
|
1379
1379
|
*
|
|
1380
|
-
* @
|
|
1380
|
+
* @typeParam Ev The event name.
|
|
1381
1381
|
* @param name The event name.
|
|
1382
|
-
* @param
|
|
1383
|
-
*
|
|
1382
|
+
* @param handler The handler invoked on the first matching delivery. The
|
|
1383
|
+
* three-argument `(name, filter, handler)` form inserts a
|
|
1384
|
+
* filter object before the handler (same shapes as `on`).
|
|
1384
1385
|
* @returns A function that unsubscribes early if called before the
|
|
1385
1386
|
* handler has fired.
|
|
1386
1387
|
*
|
|
@@ -1881,7 +1882,7 @@ declare class Machine<mDT> {
|
|
|
1881
1882
|
* - When multiple edges exist between two states with different `kind`
|
|
1882
1883
|
* values, only the first edge's kind is used to pick the edge-type hook.
|
|
1883
1884
|
*
|
|
1884
|
-
* @
|
|
1885
|
+
* @typeParam mDT The type of the machine data member; usually omitted.
|
|
1885
1886
|
*
|
|
1886
1887
|
* @param newStateOrAction The target state name (for a plain or forced
|
|
1887
1888
|
* transition) or the action name (when `wasAction` is true).
|
|
@@ -1933,7 +1934,7 @@ declare class Machine<mDT> {
|
|
|
1933
1934
|
*
|
|
1934
1935
|
* Notice that the machine's current state, `e`, is not in the returned list.
|
|
1935
1936
|
*
|
|
1936
|
-
* @
|
|
1937
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1937
1938
|
*
|
|
1938
1939
|
*/
|
|
1939
1940
|
get history(): [string, mDT][];
|
|
@@ -1966,7 +1967,7 @@ declare class Machine<mDT> {
|
|
|
1966
1967
|
*
|
|
1967
1968
|
* Notice that the machine's current state, `e`, is in the returned list.
|
|
1968
1969
|
*
|
|
1969
|
-
* @
|
|
1970
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1970
1971
|
*
|
|
1971
1972
|
*/
|
|
1972
1973
|
get history_inclusive(): [string, mDT][];
|
|
@@ -1985,7 +1986,7 @@ declare class Machine<mDT> {
|
|
|
1985
1986
|
* foo.history_length; // 5
|
|
1986
1987
|
* ```
|
|
1987
1988
|
*
|
|
1988
|
-
* @
|
|
1989
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1989
1990
|
*
|
|
1990
1991
|
*/
|
|
1991
1992
|
get history_length(): number;
|
|
@@ -2002,7 +2003,7 @@ declare class Machine<mDT> {
|
|
|
2002
2003
|
* light.state(); // 'green'
|
|
2003
2004
|
* ```
|
|
2004
2005
|
*
|
|
2005
|
-
* @
|
|
2006
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2006
2007
|
*
|
|
2007
2008
|
* @param actionName The action to engage
|
|
2008
2009
|
*
|
|
@@ -2029,7 +2030,7 @@ declare class Machine<mDT> {
|
|
|
2029
2030
|
* // { shape: 'circle' }
|
|
2030
2031
|
* ```
|
|
2031
2032
|
*
|
|
2032
|
-
* @
|
|
2033
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2033
2034
|
*
|
|
2034
2035
|
* @returns The {@link JssmStateConfig} for standard states.
|
|
2035
2036
|
*
|
|
@@ -2055,7 +2056,7 @@ declare class Machine<mDT> {
|
|
|
2055
2056
|
* // { shape: 'circle' }
|
|
2056
2057
|
* ```
|
|
2057
2058
|
*
|
|
2058
|
-
* @
|
|
2059
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2059
2060
|
*
|
|
2060
2061
|
* @returns The {@link JssmStateConfig} for hooked states.
|
|
2061
2062
|
*
|
|
@@ -2080,7 +2081,7 @@ declare class Machine<mDT> {
|
|
|
2080
2081
|
* // { shape: 'circle' }
|
|
2081
2082
|
* ```
|
|
2082
2083
|
*
|
|
2083
|
-
* @
|
|
2084
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2084
2085
|
*
|
|
2085
2086
|
* @returns The {@link JssmStateConfig} for start states.
|
|
2086
2087
|
*
|
|
@@ -2110,7 +2111,7 @@ declare class Machine<mDT> {
|
|
|
2110
2111
|
* // { shape: 'circle' }
|
|
2111
2112
|
* ```
|
|
2112
2113
|
*
|
|
2113
|
-
* @
|
|
2114
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2114
2115
|
*
|
|
2115
2116
|
* @returns The {@link JssmStateConfig} for end states.
|
|
2116
2117
|
*
|
|
@@ -2135,7 +2136,7 @@ declare class Machine<mDT> {
|
|
|
2135
2136
|
* // { shape: 'circle' }
|
|
2136
2137
|
* ```
|
|
2137
2138
|
*
|
|
2138
|
-
* @
|
|
2139
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2139
2140
|
*
|
|
2140
2141
|
* @returns The {@link JssmStateConfig} for terminal states.
|
|
2141
2142
|
*
|
|
@@ -2157,7 +2158,7 @@ declare class Machine<mDT> {
|
|
|
2157
2158
|
* // { shape: 'circle' }
|
|
2158
2159
|
* ```
|
|
2159
2160
|
*
|
|
2160
|
-
* @
|
|
2161
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2161
2162
|
*
|
|
2162
2163
|
* @returns The {@link JssmStateConfig} for the active state.
|
|
2163
2164
|
*
|
|
@@ -2337,7 +2338,7 @@ declare class Machine<mDT> {
|
|
|
2337
2338
|
* state's declaration into a fresh {@link JssmStateConfig} — the tier-5
|
|
2338
2339
|
* "`state foo : { … }`" contribution of the config cascade. A state with no
|
|
2339
2340
|
* declaration yields an all-`undefined` config (which contributes nothing
|
|
2340
|
-
* once folded with
|
|
2341
|
+
* once folded with `merge_state_config`).
|
|
2341
2342
|
*
|
|
2342
2343
|
* @param state The state whose per-state declared style is wanted.
|
|
2343
2344
|
*
|
|
@@ -2377,7 +2378,7 @@ declare class Machine<mDT> {
|
|
|
2377
2378
|
* overlay (tier 6) is NOT applied here; it is layered on top by
|
|
2378
2379
|
* {@link resolve_state_config} so it wins over per-state config.
|
|
2379
2380
|
*
|
|
2380
|
-
* Tiers, folded least-specific → most-specific with
|
|
2381
|
+
* Tiers, folded least-specific → most-specific with `merge_state_config`
|
|
2381
2382
|
* (later wins, never throwing on a cross-tier key collision):
|
|
2382
2383
|
*
|
|
2383
2384
|
* 1. theme defaults — `base_theme.state`, then each selected theme's
|
|
@@ -2409,7 +2410,7 @@ declare class Machine<mDT> {
|
|
|
2409
2410
|
* successor to the ad-hoc layer merge {@link style_for} used to perform.
|
|
2410
2411
|
*
|
|
2411
2412
|
* For any state OTHER than the current one, this returns the memoized static
|
|
2412
|
-
* resolution (tiers 1–5; see
|
|
2413
|
+
* resolution (tiers 1–5; see `_compose_state_config`) — theme →
|
|
2413
2414
|
* `default_state_config` → per-kind defaults → depth-ordered group metadata →
|
|
2414
2415
|
* per-state config. The cache is keyed by state and never invalidated, since
|
|
2415
2416
|
* those tiers do not depend on which state is current.
|
|
@@ -2419,7 +2420,7 @@ declare class Machine<mDT> {
|
|
|
2419
2420
|
* layers: the active-state THEME layers fold in just below the per-state
|
|
2420
2421
|
* config (tier 3-active), and the user `active_state : { … }` overlay folds
|
|
2421
2422
|
* in LAST (tier 6), on top of everything, so it wins over per-state config.
|
|
2422
|
-
* Every fold uses
|
|
2423
|
+
* Every fold uses `merge_state_config`, so a key set at a lower tier is
|
|
2423
2424
|
* overridden — never rejected — by a higher one.
|
|
2424
2425
|
*
|
|
2425
2426
|
* ```typescript
|
|
@@ -2429,7 +2430,7 @@ declare class Machine<mDT> {
|
|
|
2429
2430
|
* m.resolve_state_config('working').color; // '#ffa500ff' — from group &busy
|
|
2430
2431
|
* ```
|
|
2431
2432
|
*
|
|
2432
|
-
* @
|
|
2433
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2433
2434
|
*
|
|
2434
2435
|
* @param state The state to compute the composite config for.
|
|
2435
2436
|
*
|
|
@@ -2452,7 +2453,7 @@ declare class Machine<mDT> {
|
|
|
2452
2453
|
* winning over outer), then the per-state config, and finally — for the
|
|
2453
2454
|
* current state only — the active overlay. Last wins at every tier.
|
|
2454
2455
|
*
|
|
2455
|
-
* @
|
|
2456
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2456
2457
|
*
|
|
2457
2458
|
* @param state The state to compute the composite style for.
|
|
2458
2459
|
*
|
|
@@ -2486,7 +2487,7 @@ declare class Machine<mDT> {
|
|
|
2486
2487
|
* light.state(); // 'yellow'
|
|
2487
2488
|
* ```
|
|
2488
2489
|
*
|
|
2489
|
-
* @
|
|
2490
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2490
2491
|
*
|
|
2491
2492
|
* @param actionName The action to engage
|
|
2492
2493
|
*
|
|
@@ -2519,7 +2520,7 @@ declare class Machine<mDT> {
|
|
|
2519
2520
|
* light.state(); // 'green'
|
|
2520
2521
|
* ```
|
|
2521
2522
|
*
|
|
2522
|
-
* @
|
|
2523
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2523
2524
|
*
|
|
2524
2525
|
* @param newState The state to switch to
|
|
2525
2526
|
*
|
|
@@ -2541,7 +2542,7 @@ declare class Machine<mDT> {
|
|
|
2541
2542
|
* light.state(); // 'green'
|
|
2542
2543
|
* ```
|
|
2543
2544
|
*
|
|
2544
|
-
* @
|
|
2545
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2545
2546
|
*
|
|
2546
2547
|
* @param newState The state to switch to
|
|
2547
2548
|
*
|
|
@@ -2566,7 +2567,7 @@ declare class Machine<mDT> {
|
|
|
2566
2567
|
* light.state(); // 'off'
|
|
2567
2568
|
* ```
|
|
2568
2569
|
*
|
|
2569
|
-
* @
|
|
2570
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2570
2571
|
*
|
|
2571
2572
|
* @param newState The state to switch to
|
|
2572
2573
|
*
|
|
@@ -2670,7 +2671,7 @@ declare class Machine<mDT> {
|
|
|
2670
2671
|
* const lswitch = jssm.from('on <=> off;');
|
|
2671
2672
|
* ```
|
|
2672
2673
|
*
|
|
2673
|
-
* @
|
|
2674
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2674
2675
|
*
|
|
2675
2676
|
* @param template_strings The assembled code
|
|
2676
2677
|
*
|
|
@@ -2693,7 +2694,7 @@ declare function sm<mDT>(template_strings: TemplateStringsArray, ...remainder: a
|
|
|
2693
2694
|
* const lswitch = jssm.from('on <=> off;');
|
|
2694
2695
|
* ```
|
|
2695
2696
|
*
|
|
2696
|
-
* @
|
|
2697
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2697
2698
|
*
|
|
2698
2699
|
* @param MachineAsString The FSL code to evaluate
|
|
2699
2700
|
*
|
|
@@ -2719,7 +2720,7 @@ declare function from<mDT>(MachineAsString: string, ExtraConstructorFields?: Par
|
|
|
2719
2720
|
* is_hook_complex_result({ other: 'thing' }); // false
|
|
2720
2721
|
* ```
|
|
2721
2722
|
*
|
|
2722
|
-
* @
|
|
2723
|
+
* @typeParam mDT The type of the machine data member; usually omitted.
|
|
2723
2724
|
*
|
|
2724
2725
|
* @param hr The value to test.
|
|
2725
2726
|
*
|
|
@@ -2748,7 +2749,7 @@ declare function is_hook_complex_result<mDT>(hr: unknown): hr is HookComplexResu
|
|
|
2748
2749
|
* is_hook_rejection({ pass: false }); // true (reject)
|
|
2749
2750
|
* ```
|
|
2750
2751
|
*
|
|
2751
|
-
* @
|
|
2752
|
+
* @typeParam mDT The type of the machine data member; usually omitted.
|
|
2752
2753
|
*
|
|
2753
2754
|
* @param hr A hook result of any legal shape.
|
|
2754
2755
|
*
|
|
@@ -2778,7 +2779,7 @@ declare function is_hook_rejection<mDT>(hr: HookResult<mDT>): boolean;
|
|
|
2778
2779
|
*
|
|
2779
2780
|
* Anything else is a programmer error and throws.
|
|
2780
2781
|
*
|
|
2781
|
-
* @
|
|
2782
|
+
* @typeParam mDT The type of the machine data member; usually omitted.
|
|
2782
2783
|
*
|
|
2783
2784
|
* @param maybe_hook The hook handler to call, or `undefined` for the
|
|
2784
2785
|
* "no hook installed" case.
|
|
@@ -2815,7 +2816,7 @@ declare function abstract_hook_step<mDT>(maybe_hook: HookHandler<mDT> | undefine
|
|
|
2815
2816
|
* - `false` or `null` → `{ pass: false }`
|
|
2816
2817
|
* - a complex result → returned as-is
|
|
2817
2818
|
*
|
|
2818
|
-
* @
|
|
2819
|
+
* @typeParam mDT The type of the machine data member; usually omitted.
|
|
2819
2820
|
*
|
|
2820
2821
|
* @param maybe_hook The everything-hook handler, or `undefined` when none
|
|
2821
2822
|
* is installed.
|
|
@@ -2880,7 +2881,7 @@ declare function compareVersions(v1: string, v2: string): number;
|
|
|
2880
2881
|
* state, data, and history. For security and compatibility reasons, it will
|
|
2881
2882
|
* refuse to deserialize data from future versions of the library.
|
|
2882
2883
|
*
|
|
2883
|
-
* @
|
|
2884
|
+
* @typeParam mDT - The type of the machine data member
|
|
2884
2885
|
*
|
|
2885
2886
|
* @param {string} machine_string - The FSL string defining the machine structure
|
|
2886
2887
|
* @param {JssmSerialization<mDT>} ser - The serialization object to restore from
|