fix: declare vue component type

ref: https://staging.vuejs.org/guide/typescript/overview.html#typescript-in-templates
This commit is contained in:
hanlee committed 2022-01-09 16:53:56 +09:00
1 parent cf503587e7
commit 2de501b03f
1 file changed
+5 -4
+5 -4
View File
@@ -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
}