From 282b279a8fb6fdd57561b51bd5bba098f5ff4763 Mon Sep 17 00:00:00 2001 From: Haris Razis Date: Sun, 20 Dec 2020 21:13:44 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20Add=20file=20definitions=20for=20TS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/shims-vue.d.ts | 6 +++--- web/src/slims-vuex.d.ts | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 web/src/slims-vuex.d.ts diff --git a/web/src/shims-vue.d.ts b/web/src/shims-vue.d.ts index 2b97bd9..6ad95a7 100644 --- a/web/src/shims-vue.d.ts +++ b/web/src/shims-vue.d.ts @@ -1,5 +1,5 @@ declare module '*.vue' { - import type { DefineComponent } from 'vue' - const component: DefineComponent<{}, {}, any> - export default component + import type {DefineComponent} from 'vue' + const component: DefineComponent<{}, {}, any> + export default component } diff --git a/web/src/slims-vuex.d.ts b/web/src/slims-vuex.d.ts new file mode 100644 index 0000000..b68c7fd --- /dev/null +++ b/web/src/slims-vuex.d.ts @@ -0,0 +1,7 @@ +import { Store } from '@/store';// path to store file + +declare module '@vue/runtime-core' { + interface ComponentCustomProperties { + $store: Store; + } +}