aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/src/stores/SharedStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared/src/stores/SharedStore.ts')
-rw-r--r--packages/shared/src/stores/SharedStore.ts23
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 @@
1import {
2 IJsonPatch,
3 Instance,
4 types,
5 SnapshotIn,
6 SnapshotOut,
7} from 'mobx-state-tree';
8
9export const sharedStore = types.model("SharedStore", {
10 clickCount: 0
11});
12
13export interface SharedStore extends Instance<typeof sharedStore> {}
14
15export interface SharedStoreSnapshotIn extends SnapshotIn<typeof sharedStore> {}
16
17export interface SharedStoreSnapshotOut extends SnapshotOut<typeof sharedStore> {}
18
19export interface SharedStoreListener {
20 onSnapshot(snapshot: SharedStoreSnapshotIn): void;
21
22 onPatch(patch: IJsonPatch): void;
23}