From c284e9aafc369784fa58cd0dc6a536c4bf2e1a84 Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Tue, 4 Oct 2022 08:05:53 +0200 Subject: refactor: rename store type --- src-vue/src/plugins/store.ts | 10 +++++----- src-vue/src/vuex-shim.d.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 7f649a51..9d1bd89f 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -9,7 +9,7 @@ import { ElNotification } from 'element-plus'; import { NorthstarState } from '../utils/NorthstarState'; -export type Store = { +export interface FlightCoreStore { current_tab: Tabs, developer_mode: boolean, game_path: string, @@ -23,13 +23,13 @@ export type Store = { origin_is_running: boolean } -export const store = createStore({ - state () { +export const store = createStore({ + state (): FlightCoreStore { return { current_tab: Tabs.PLAY, developer_mode: false, - game_path: undefined, - install_type: undefined, + game_path: undefined as unknown as string, + install_type: undefined as unknown as InstallType, installed_northstar_version: "", northstar_state: NorthstarState.GAME_NOT_FOUND, diff --git a/src-vue/src/vuex-shim.d.ts b/src-vue/src/vuex-shim.d.ts index 1429115b..40438a97 100644 --- a/src-vue/src/vuex-shim.d.ts +++ b/src-vue/src/vuex-shim.d.ts @@ -3,6 +3,6 @@ import { Store } from 'vuex' declare module '@vue/runtime-core' { interface ComponentCustomProperties { - $store: Store + $store: Store } } -- cgit v1.2.3