You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
581 B
TypeScript

1 year ago
/// <reference types="vite/client" />
// vue3 报错提示 找不到模块“./XXX.vue”或其相应的类型声明
// 报错原因typescript 只能理解 .ts 文件,无法理解 .vue文件
declare module '*.vue' {
import type { DefineComponent } from 'vue';
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>;
export default component;
// interface ComponentCustomProperties {
// // 声明全局方法
// $msg: {
// formatTime: () => string;
// };
// }
}