fix: declare vue component type
ref: https://staging.vuejs.org/guide/typescript/overview.html#typescript-in-templates
This commit is contained in:
parent
cf503587e7
commit
2de501b03f
9
src/shims.d.ts
vendored
9
src/shims.d.ts
vendored
@ -4,12 +4,13 @@ declare interface Window {
|
|||||||
|
|
||||||
// with vite-plugin-md, markdowns can be treat as Vue components
|
// with vite-plugin-md, markdowns can be treat as Vue components
|
||||||
declare module '*.md' {
|
declare module '*.md' {
|
||||||
import type { ComponentOptions } from 'vue'
|
import type { DefineComponent } from 'vue'
|
||||||
const component: ComponentOptions
|
const component: DefineComponent<{}, {}, any>
|
||||||
export default component
|
export default component
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import Vue from 'vue'
|
import type { DefineComponent } from 'vue'
|
||||||
export default Vue
|
const component: DefineComponent<{}, {}, any>
|
||||||
|
export default component
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user