当前位置:网站首页>Type expansion of non ts/js file modules
Type expansion of non ts/js file modules
2022-07-03 01:20:00 【Program ape runs forward】
Right ts/js Type expansion of file module
ts Only module import and export are supported , But sometimes you may need to introduce css/html Wait for the documents , At this time, you need to use wildcards to make ts Think of them as modules , The following is true. ".vue" File import support ( come from vue official ):
Can't find .vue The statement of , It's actually TS Can't recognize .vue Files of type .
introduce .vue File tips “Could not find a declaration file for module ‘xxx.vue’…”
Sometimes in the development process, it just prompts that there is something wrong , Does not affect the operation of the project , But an error will be reported when packing , It makes it impossible to package .
stay src File directory ( That is, the folder where your development code is located ) add to shims-vue.d.ts file , The content is
// global.d.ts
declare module '*.vue' {
import {
DefineComponent } from 'vue'
const component: DefineComponent<{
}, {
}, any>
export default component
}
边栏推荐
- [shutter] image component (configure local GIF image resources | load placeholder with local resources)
- Kivy tutorial how to create drop-down lists in Kivy
- 拥抱平台化交付的安全理念
- Matlab saves the digital matrix as geospatial data, and the display subscript index must be of positive integer type or logical type. Solve the problem
- MySQL --- 数据库查询 - 基本查询
- 无向图的割点
- 攻克哈希的基本概念与实现
- Compare version number
- Every k nodes in the linked list are flipped
- tp6快速安装使用MongoDB实现增删改查
猜你喜欢
机器学习术语
RISA rz/g2l processor introduction | frame diagram | power consumption | schematic diagram and hardware design guide
信息熵的基础
Arduino DY-SV17F自动语音播报
Excel calculates the difference between time and date and converts it into minutes
Leetcode 6103 - minimum fraction to delete an edge from the tree
Machine learning terminology
Cut point of undirected graph
软考信息系统项目管理师_历年真题_2019下半年错题集_上午综合知识题---软考高级之信息系统项目管理师053
[Androd] Gradle 使用技巧之模块依赖替换
随机推荐
Embrace the safety concept of platform delivery
比较版本号
Several cases of recursive processing organization
Kivy tutorial - example of using Matplotlib in Kivy app
机器学习术语
[Androd] Gradle 使用技巧之模块依赖替换
Linear programming of mathematical modeling (including Matlab code)
MySQL basic usage 02
看疫情之下服装企业如何顺势而为
Soft exam information system project manager_ Real topic over the years_ Wrong question set in the second half of 2019_ Morning comprehensive knowledge question - Senior Information System Project Man
Key wizard hit strange learning - automatic path finding back to hit strange points
Correctly distinguish the similarities and differences among API, rest API, restful API and web service
Top ten regular spot trading platforms 2022
dotConnect for PostgreSQL数据提供程序
Canvas drawing -- bingdd
Matlab Doppler effect produces vibration signal and processing
excel IF公式判断两列是否相同
如今少年已归来,人间烟火气最抚凡人心 复工了~
Create your first Kivy program Hello word (tutorial includes source code)
Explain the basic concepts and five attributes of RDD in detail