aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/stores/MainStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/stores/MainStore.ts')
-rw-r--r--packages/main/src/stores/MainStore.ts22
1 files changed, 14 insertions, 8 deletions
diff --git a/packages/main/src/stores/MainStore.ts b/packages/main/src/stores/MainStore.ts
index 18f5bf9..ff014c9 100644
--- a/packages/main/src/stores/MainStore.ts
+++ b/packages/main/src/stores/MainStore.ts
@@ -21,12 +21,12 @@
21import type { BrowserViewBounds } from '@sophie/shared'; 21import type { BrowserViewBounds } from '@sophie/shared';
22import { applySnapshot, Instance, types } from 'mobx-state-tree'; 22import { applySnapshot, Instance, types } from 'mobx-state-tree';
23 23
24import { GlobalSettings } from './GlobalSettings'; 24import GlobalSettings from './GlobalSettings';
25import { Profile } from './Profile'; 25import Profile from './Profile';
26import { Service } from './Service'; 26import Service from './Service';
27import { sharedStore } from './SharedStore'; 27import SharedStore from './SharedStore';
28 28
29export const mainStore = types 29const MainStore = types
30 .model('MainStore', { 30 .model('MainStore', {
31 browserViewBounds: types.optional( 31 browserViewBounds: types.optional(
32 types.model('BrowserViewBounds', { 32 types.model('BrowserViewBounds', {
@@ -37,7 +37,7 @@ export const mainStore = types
37 }), 37 }),
38 {}, 38 {},
39 ), 39 ),
40 shared: types.optional(sharedStore, {}), 40 shared: types.optional(SharedStore, {}),
41 }) 41 })
42 .views((self) => ({ 42 .views((self) => ({
43 get settings(): GlobalSettings { 43 get settings(): GlobalSettings {
@@ -56,8 +56,14 @@ export const mainStore = types
56 }, 56 },
57 })); 57 }));
58 58
59export interface MainStore extends Instance<typeof mainStore> {} 59/*
60 eslint-disable-next-line @typescript-eslint/no-redeclare --
61 Intentionally naming the type the same as the store definition.
62*/
63interface MainStore extends Instance<typeof MainStore> {}
64
65export default MainStore;
60 66
61export function createMainStore(): MainStore { 67export function createMainStore(): MainStore {
62 return mainStore.create(); 68 return MainStore.create();
63} 69}