diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-01-27 00:17:22 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-02-08 21:43:17 +0100 |
commit | 9546dc2aa39ab096ccc723786e718a739d0bdaf9 (patch) | |
tree | 9c3afc6155cc59f6dd1235397230aaa15a5f8cec /packages/shared/src/stores/Service.ts | |
parent | refactor: Apply shared store patches in batches (diff) | |
download | sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.tar.gz sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.tar.zst sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.zip |
refactor: Coding conventions
Make sure that files have a default import with the same name as the
file whenever possible to reduce surprise.
Also shuffles around some file names for better legibility.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/shared/src/stores/Service.ts')
-rw-r--r-- | packages/shared/src/stores/Service.ts | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/shared/src/stores/Service.ts b/packages/shared/src/stores/Service.ts index 36acd3d..4a7334d 100644 --- a/packages/shared/src/stores/Service.ts +++ b/packages/shared/src/stores/Service.ts | |||
@@ -20,11 +20,11 @@ | |||
20 | 20 | ||
21 | import { Instance, types } from 'mobx-state-tree'; | 21 | import { Instance, types } from 'mobx-state-tree'; |
22 | 22 | ||
23 | import { serviceSettings } from './ServiceSettings'; | 23 | import ServiceSettings from './ServiceSettings'; |
24 | 24 | ||
25 | export const service = types.model('Service', { | 25 | const Service = types.model('Service', { |
26 | id: types.identifier, | 26 | id: types.identifier, |
27 | settings: serviceSettings, | 27 | settings: ServiceSettings, |
28 | currentUrl: types.maybe(types.string), | 28 | currentUrl: types.maybe(types.string), |
29 | canGoBack: false, | 29 | canGoBack: false, |
30 | canGoForward: false, | 30 | canGoForward: false, |
@@ -37,4 +37,10 @@ export const service = types.model('Service', { | |||
37 | indirectMessageCount: 0, | 37 | indirectMessageCount: 0, |
38 | }); | 38 | }); |
39 | 39 | ||
40 | export interface Service extends Instance<typeof service> {} | 40 | /* |
41 | eslint-disable-next-line @typescript-eslint/no-redeclare -- | ||
42 | Intentionally naming the type the same as the store definition. | ||
43 | */ | ||
44 | interface Service extends Instance<typeof Service> {} | ||
45 | |||
46 | export default Service; | ||