From faf9c82d28d21aa0e0bf71c51c1f470c059fed7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 6 Mar 2024 15:56:17 +0100 Subject: [PATCH] refactor(ui): refine types augmentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ui/web/src/global-properties.d.ts | 10 ---------- ui/web/src/shims-vue.d.ts | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 ui/web/src/global-properties.d.ts diff --git a/ui/web/src/global-properties.d.ts b/ui/web/src/global-properties.d.ts deleted file mode 100644 index f20cc81a..00000000 --- a/ui/web/src/global-properties.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export {} - -declare module 'vue' { - interface ComponentCustomProperties { - $configuration: Ref - $templates: Ref - $chargingStations: Ref - $uiClient: UIClient - } -} diff --git a/ui/web/src/shims-vue.d.ts b/ui/web/src/shims-vue.d.ts index c9d5581c..1b934bff 100644 --- a/ui/web/src/shims-vue.d.ts +++ b/ui/web/src/shims-vue.d.ts @@ -1,6 +1,14 @@ -declare module '*.vue' { - import type { DefineComponent } from 'vue' - // eslint-disable-next-line @typescript-eslint/ban-types - const component: DefineComponent<{}, {}, unknown> - export default component +export {} + +declare module 'vue' { + export interface GlobalComponents { + RouterLink: (typeof import('vue-router'))['RouterLink'] + RouterView: (typeof import('vue-router'))['RouterView'] + } + interface ComponentCustomProperties { + $configuration: Ref + $templates: Ref + $chargingStations: Ref + $uiClient: import('@/composables').UIClient + } } -- 2.34.1