blob: 31504be605555c39a87ad1035381beb4c66d0b89 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import {
IJsonPatch,
Instance,
types,
SnapshotIn,
SnapshotOut,
} from 'mobx-state-tree';
export const sharedStore = types.model("SharedStore", {
shouldUseDarkColors: true,
clickCount: 0
});
export interface SharedStore extends Instance<typeof sharedStore> {}
export interface SharedStoreSnapshotIn extends SnapshotIn<typeof sharedStore> {}
export interface SharedStoreSnapshotOut extends SnapshotOut<typeof sharedStore> {}
export interface SharedStoreListener {
onSnapshot(snapshot: SharedStoreSnapshotIn): void;
onPatch(patch: IJsonPatch): void;
}
|