@@ -13,18 +13,16 @@ export type Mutation = {
1313}
1414
1515class ProxyStateTree {
16- state : object
17- options : Options
18- pathDependencies : object
19- globalDependencies : Set < Function >
20- objectChanges : Set < string >
21- mutations : Mutation [ ]
22- currentMutations : Mutation [ ]
23- paths : Set < string > [ ]
24- status : STATUS
25- proxy : any
26- currentFlushId : number
27- constructor ( state : object , options : Options = { } ) {
16+ pathDependencies : object = { }
17+ private globalDependencies = new Set < Function > ( )
18+ private objectChanges = new Set < string > ( )
19+ private mutations : Mutation [ ] = [ ]
20+ private currentMutations : Mutation [ ] = [ ]
21+ private paths : Set < string > [ ] = [ ]
22+ private status : STATUS = STATUS . IDLE
23+ private currentFlushId : number = 0
24+ private proxy : any
25+ constructor ( private state : object , private options : Options = { } ) {
2826 if ( ! isPlainObject ( state ) ) {
2927 throw new Error (
3028 'You did not pass a plain object as state to Proxy State Tree'
@@ -35,17 +33,7 @@ class ProxyStateTree {
3533 options . devmode = true
3634 }
3735
38- this . state = state
39- this . options = options
40- this . pathDependencies = { }
41- this . globalDependencies = new Set ( )
42- this . mutations = [ ]
43- this . currentMutations = [ ]
44- this . paths = [ ]
45- this . objectChanges = new Set ( )
46- this . status = STATUS . IDLE
4736 this . proxy = proxify ( this , state )
48- this . currentFlushId = 0
4937 }
5038 get ( ) {
5139 return this . proxy
0 commit comments