aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/stores/ServiceSettings.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/main/src/stores/ServiceSettings.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/main/src/stores/ServiceSettings.ts')
-rw-r--r--packages/main/src/stores/ServiceSettings.ts16
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/main/src/stores/ServiceSettings.ts b/packages/main/src/stores/ServiceSettings.ts
index 960de9b..e6f48c6 100644
--- a/packages/main/src/stores/ServiceSettings.ts
+++ b/packages/main/src/stores/ServiceSettings.ts
@@ -18,18 +18,24 @@
18 * SPDX-License-Identifier: AGPL-3.0-only 18 * SPDX-License-Identifier: AGPL-3.0-only
19 */ 19 */
20 20
21import { serviceSettings as originalServiceSettings } from '@sophie/shared'; 21import { ServiceSettings as ServiceSettingsBase } from '@sophie/shared';
22import { Instance, types } from 'mobx-state-tree'; 22import { Instance, types } from 'mobx-state-tree';
23 23
24import overrideProps from '../utils/overrideProps'; 24import overrideProps from '../utils/overrideProps';
25 25
26import { profile } from './Profile'; 26import Profile from './Profile';
27 27
28export const serviceSettings = overrideProps(originalServiceSettings, { 28const ServiceSettings = overrideProps(ServiceSettingsBase, {
29 profile: types.reference(profile), 29 profile: types.reference(Profile),
30}); 30});
31 31
32export interface ServiceSettings extends Instance<typeof serviceSettings> {} 32/*
33 eslint-disable-next-line @typescript-eslint/no-redeclare --
34 Intentionally naming the type the same as the store definition.
35*/
36interface ServiceSettings extends Instance<typeof ServiceSettings> {}
37
38export default ServiceSettings;
33 39
34export type { 40export type {
35 ServiceSettingsSnapshotIn, 41 ServiceSettingsSnapshotIn,