21 lines
541 B
TypeScript
21 lines
541 B
TypeScript
/// <reference types="vite/client" />
|
|
|
|
// 添加 Vue 文件的类型声明
|
|
declare module '*.vue' {
|
|
import type { DefineComponent } from 'vue'
|
|
const component: DefineComponent<{}, {}, any>
|
|
export default component
|
|
}
|
|
|
|
declare module '*.md' {
|
|
import type { ComponentOptions } from 'vue'
|
|
import type { Frontmatter } from 'vite-plugin-md'
|
|
const Component: ComponentOptions
|
|
export default Component
|
|
export const frontmatter: Frontmatter
|
|
}
|
|
|
|
type MdModule = {
|
|
default: ComponentOptions;
|
|
frontmatter: Frontmatter;
|
|
} |