共计 390 个字符,预计需要花费 1 分钟才能阅读完成。
- 【TypeScript】JSX 元素隐式具有类型 “any“,因为不存在接口 “JSX.IntrinsicElements“。ts(7026)
{ | |
"compilerOptions": { | |
"jsx": "preserve", | |
"jsxImportSource": "vue", | |
// ... | |
} | |
} |
vue 大于等于 3.4 看此链接:https://vuejs.org/guide/extras/render-function.html#jsx-type-inference
- Cannot find module … or its corresponding type declarations.(ts2307)
vscode 中快捷键 ctrl
+ shift
+ p
,搜索 Select TypeScript Version
,选择 Use WorkspaceVersion
选项,然后重启 vscode。
这里需要先执行 pnpm install 才能进行选择。
提醒:本文发布于284天前,文中所关联的信息可能已发生改变,请知悉!
AD:【腾讯云服务器大降价】2核4G 222元/3年 1核2G 38元/年
正文完