diff options
Diffstat (limited to 'packages/shared/src/stores/SharedStore.ts')
-rw-r--r-- | packages/shared/src/stores/SharedStore.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/shared/src/stores/SharedStore.ts b/packages/shared/src/stores/SharedStore.ts new file mode 100644 index 0000000..8933bca --- /dev/null +++ b/packages/shared/src/stores/SharedStore.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | import { | ||
2 | IJsonPatch, | ||
3 | Instance, | ||
4 | types, | ||
5 | SnapshotIn, | ||
6 | SnapshotOut, | ||
7 | } from 'mobx-state-tree'; | ||
8 | |||
9 | export const sharedStore = types.model("SharedStore", { | ||
10 | clickCount: 0 | ||
11 | }); | ||
12 | |||
13 | export interface SharedStore extends Instance<typeof sharedStore> {} | ||
14 | |||
15 | export interface SharedStoreSnapshotIn extends SnapshotIn<typeof sharedStore> {} | ||
16 | |||
17 | export interface SharedStoreSnapshotOut extends SnapshotOut<typeof sharedStore> {} | ||
18 | |||
19 | export interface SharedStoreListener { | ||
20 | onSnapshot(snapshot: SharedStoreSnapshotIn): void; | ||
21 | |||
22 | onPatch(patch: IJsonPatch): void; | ||
23 | } | ||