typescript 中引用子组件或第三方组件时出现以下提示

image.png
解决方式
在根目录新建*.d.ts 文件 ,我这里是vue-component.d.ts 内容
declare module "*.vue" {
import { defineComponent } from "vue";
const Component: ReturnType<typeof defineComponent>;
export default Component;
}
之后在tsconfig.json inclues中 加上此文件即可
注:有其他文章也建议使用
import Vue from 'Vue'
export defaultVue
但在我的项目中出现了普通.vue页面识别异常的问题,故弃用