aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/src/stores/Service.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-27 00:17:22 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-02-08 21:43:17 +0100
commit9546dc2aa39ab096ccc723786e718a739d0bdaf9 (patch)
tree9c3afc6155cc59f6dd1235397230aaa15a5f8cec /packages/shared/src/stores/Service.ts
parentrefactor: Apply shared store patches in batches (diff)
downloadsophie-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.ts14
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
21import { Instance, types } from 'mobx-state-tree'; 21import { Instance, types } from 'mobx-state-tree';
22 22
23import { serviceSettings } from './ServiceSettings'; 23import ServiceSettings from './ServiceSettings';
24 24
25export const service = types.model('Service', { 25const 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
40export 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*/
44interface Service extends Instance<typeof Service> {}
45
46export default Service;