File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ declare module FSM {
3434 onExit ? : string | StateCallback ;
3535 }
3636
37+ export interface SessionCreationData {
38+ fda : string ;
39+ controller ? : any ;
40+ }
41+
3742 export interface TransitionMessage {
3843 msgId : string ;
3944 data ? : any ;
@@ -98,6 +103,7 @@ declare module FSM {
98103 getProperty ( key :string ) : any ;
99104 start ( callback :ConsumeCallback ) : void ;
100105 fireCustomEvent ( e :any ) : void ;
106+ serialize ( ) : any ;
101107 }
102108
103109 class GuardException {
@@ -131,11 +137,11 @@ declare module FSM {
131137 }
132138}
133139
134- declare module Automata {
140+ declare module "automata" {
135141
136142 export function registerFSM ( object :FSM . FSMDefinition ) ;
137143 export function registerFDA ( object :FSM . FSMDefinition ) ;
138- export function createSession ( fda_name : string , controller : any ) : FSM . Session ;
144+ export function createSession ( data : FSM . SessionCreationData ) : FSM . Session ;
139145 export function newGuardException ( message : string ) : FSM . GuardException ;
140146 export function newSessionListener ( obj : any ) : FSM . SessionListener ;
141147 export function deserializeSession ( obj : any , controllerDeserializerFunction ) : FSM . Session ;
Original file line number Diff line number Diff line change 22612261
22622262 }
22632263
2264- exports = module . exports = _export ;
2264+ root . exports = root . module . exports = _export ;
22652265
2266- } ) ( typeof window !== ' undefined' ? window : global ) ;
2266+ } ) ( typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== " undefined" ? window : { } ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " automata" ,
3- "version" : " 2.0.2 " ,
3+ "version" : " 2.0.3 " ,
44 "main" : " automata" ,
55 "keywords" : [
66 " DFA" ,
1919 "engines" : {
2020 "node" : " *"
2121 },
22+ "license" : " MIT" ,
2223 "homepage" : " http://github.com/hyperandroid/automata"
2324}
You can’t perform that action at this time.
0 commit comments