aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/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/shared/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/shared/src/stores/ServiceSettings.ts')
-rw-r--r--packages/shared/src/stores/ServiceSettings.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/packages/shared/src/stores/ServiceSettings.ts b/packages/shared/src/stores/ServiceSettings.ts
index 54cd7eb..6ba1dfa 100644
--- a/packages/shared/src/stores/ServiceSettings.ts
+++ b/packages/shared/src/stores/ServiceSettings.ts
@@ -20,19 +20,25 @@
20 20
21import { Instance, types, SnapshotIn, SnapshotOut } from 'mobx-state-tree'; 21import { Instance, types, SnapshotIn, SnapshotOut } from 'mobx-state-tree';
22 22
23import { profile } from './Profile'; 23import Profile from './Profile';
24 24
25export const serviceSettings = types.model('ServiceSettings', { 25const ServiceSettings = types.model('ServiceSettings', {
26 name: types.string, 26 name: types.string,
27 profile: types.reference(profile), 27 profile: types.reference(Profile),
28 // TODO: Remove this once recipes are added. 28 // TODO: Remove this once recipes are added.
29 url: types.string, 29 url: types.string,
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 interface ServiceSettingsSnapshotIn 40export interface ServiceSettingsSnapshotIn
35 extends SnapshotIn<typeof serviceSettings> {} 41 extends SnapshotIn<typeof ServiceSettings> {}
36 42
37export interface ServiceSettingsSnapshotOut 43export interface ServiceSettingsSnapshotOut
38 extends SnapshotOut<typeof serviceSettings> {} 44 extends SnapshotOut<typeof ServiceSettings> {}