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
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user