jssm 5.76.2 → 5.77.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/CHANGELOG.md +44 -49
- package/README.md +2 -2
- package/dist/es6/jssm.d.ts +21 -1
- package/dist/es6/jssm.js +23 -1
- 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 +21 -1
- package/package.json +1 -1
- package/rollup.config.deno.js +45 -0
- package/typedoc-options.js +1 -1
package/jssm.d.ts
CHANGED
|
@@ -685,7 +685,7 @@ declare class Machine<mDT> {
|
|
|
685
685
|
action(actionName: StateType, newData?: mDT): boolean;
|
|
686
686
|
/********
|
|
687
687
|
*
|
|
688
|
-
* Instruct the machine to complete a transition.
|
|
688
|
+
* Instruct the machine to complete a transition. Synonym for {@link go}.
|
|
689
689
|
*
|
|
690
690
|
* ```typescript
|
|
691
691
|
* const light = sm`red -> green -> yellow -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
@@ -703,6 +703,26 @@ declare class Machine<mDT> {
|
|
|
703
703
|
*
|
|
704
704
|
*/
|
|
705
705
|
transition(newState: StateType, newData?: mDT): boolean;
|
|
706
|
+
/********
|
|
707
|
+
*
|
|
708
|
+
* Instruct the machine to complete a transition. Synonym for {@link transition}.
|
|
709
|
+
*
|
|
710
|
+
* ```typescript
|
|
711
|
+
* const light = sm`red -> green -> yellow -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
712
|
+
*
|
|
713
|
+
* light.state(); // 'red'
|
|
714
|
+
* light.go('green'); // true
|
|
715
|
+
* light.state(); // 'green'
|
|
716
|
+
* ```
|
|
717
|
+
*
|
|
718
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
719
|
+
*
|
|
720
|
+
* @param newState The state to switch to
|
|
721
|
+
*
|
|
722
|
+
* @param newData The data change to insert during the transition
|
|
723
|
+
*
|
|
724
|
+
*/
|
|
725
|
+
go(newState: StateType, newData?: mDT): boolean;
|
|
706
726
|
/********
|
|
707
727
|
*
|
|
708
728
|
* Instruct the machine to complete a forced transition (which will reject if
|
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
3
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
4
|
+
import replace from '@rollup/plugin-replace';
|
|
5
|
+
|
|
6
|
+
const pkg = require('./package.json');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const config = {
|
|
12
|
+
|
|
13
|
+
input: 'dist/es6/jssm.js',
|
|
14
|
+
|
|
15
|
+
output: {
|
|
16
|
+
file : 'dist/deno/jssm.deno-esm.js',
|
|
17
|
+
format : 'esm',
|
|
18
|
+
name : 'jssm'
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
plugins : [
|
|
22
|
+
|
|
23
|
+
nodeResolve({
|
|
24
|
+
mainFields : ['module', 'main'],
|
|
25
|
+
browser : true,
|
|
26
|
+
extensions : [ '.js', '.json', '.ts', '.tsx' ],
|
|
27
|
+
preferBuiltins : false
|
|
28
|
+
}),
|
|
29
|
+
|
|
30
|
+
commonjs(),
|
|
31
|
+
|
|
32
|
+
replace({
|
|
33
|
+
preventAssignment : true,
|
|
34
|
+
'process.env.NODE_ENV' : JSON.stringify( 'production' )
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export default config;
|
package/typedoc-options.js
CHANGED
|
@@ -27,7 +27,7 @@ module.exports = {
|
|
|
27
27
|
{ title: 'Node', source: 'todo.md' },
|
|
28
28
|
{ title: 'Typescript', source: 'todo.md' },
|
|
29
29
|
{ title: 'The browser', source: 'todo.md' },
|
|
30
|
-
|
|
30
|
+
// { title: 'Deno', source: 'todo.md' },
|
|
31
31
|
{ title: 'AWS Lambda', source: 'todo.md' },
|
|
32
32
|
{ title: 'SQL', source: 'todo.md' },
|
|
33
33
|
] },
|