From 2de501b03fd6623f6561bd75f5778ae78e33b1e0 Mon Sep 17 00:00:00 2001 From: hanlee Date: Sun, 9 Jan 2022 16:53:56 +0900 Subject: [PATCH] fix: declare vue component type ref: https://staging.vuejs.org/guide/typescript/overview.html#typescript-in-templates --- src/shims.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/shims.d.ts b/src/shims.d.ts index a320715..069f41c 100644 --- a/src/shims.d.ts +++ b/src/shims.d.ts @@ -4,12 +4,13 @@ declare interface Window { // with vite-plugin-md, markdowns can be treat as Vue components declare module '*.md' { - import type { ComponentOptions } from 'vue' - const component: ComponentOptions + import type { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> export default component } declare module '*.vue' { - import Vue from 'vue' - export default Vue + import type { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component }