diff options
Diffstat (limited to 'packages/main/src/stores/MainStore.ts')
-rw-r--r-- | packages/main/src/stores/MainStore.ts | 22 |
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 @@ | |||
21 | import type { BrowserViewBounds } from '@sophie/shared'; | 21 | import type { BrowserViewBounds } from '@sophie/shared'; |
22 | import { applySnapshot, Instance, types } from 'mobx-state-tree'; | 22 | import { applySnapshot, Instance, types } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import { GlobalSettings } from './GlobalSettings'; | 24 | import GlobalSettings from './GlobalSettings'; |
25 | import { Profile } from './Profile'; | 25 | import Profile from './Profile'; |
26 | import { Service } from './Service'; | 26 | import Service from './Service'; |
27 | import { sharedStore } from './SharedStore'; | 27 | import SharedStore from './SharedStore'; |
28 | 28 | ||
29 | export const mainStore = types | 29 | const 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 | ||
59 | export 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 | */ | ||
63 | interface MainStore extends Instance<typeof MainStore> {} | ||
64 | |||
65 | export default MainStore; | ||
60 | 66 | ||
61 | export function createMainStore(): MainStore { | 67 | export function createMainStore(): MainStore { |
62 | return mainStore.create(); | 68 | return MainStore.create(); |
63 | } | 69 | } |