File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ import myImmutable from './my-immutable';
46
46
47
47
const consumer = myImmutable .connect ();
48
48
49
- const objectPath = ' a.b.c' ;
49
+ const objectPaths = [ ' a.b.c' , ' a.b ' ] ;
50
50
51
- const data : AccessorResponse = consumer .get ( objectPath );
52
-
53
- console .log ( data ); // { 'a.b.c', 24 }
51
+ const data : AccessorResponse = consumer .get ( ... objectPaths );
52
+ // => data = {
53
+ // 'a.b': { c: 24 },
54
+ // 'a.b.c': 24
55
+ // }
54
56
```
55
57
56
58
### Manually Discard an AutoImmutable Consumer.
Original file line number Diff line number Diff line change 68
68
"test:watch" : " jest --updateSnapshot --watchAll"
69
69
},
70
70
"types" : " dist/index.d.ts" ,
71
- "version" : " 1.0.1-rc.0 "
71
+ "version" : " 1.0.1"
72
72
}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export class Immutable<T extends Value = Value> extends Closable {
77
77
78
78
@invoke
79
79
connect ( ) {
80
- return new Connection (
80
+ return new Connection < T > (
81
81
`${ deps . numCreated } :${ ++ this . #numConnectionsCreated } ` , {
82
82
key : this ,
83
83
map : Immutable . #cacheMap
You can’t perform that action at this time.
0 commit comments