fix: declare vue component type

ref: https://staging.vuejs.org/guide/typescript/overview.html#typescript-in-templates
This commit is contained in:
hanlee 2022-01-09 16:53:56 +09:00
parent cf503587e7
commit 2de501b03f
No known key found for this signature in database
GPG Key ID: 17C81448D8058286

9
src/shims.d.ts vendored
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
}