【发布时间】:2020-12-23 10:32:18
【问题描述】:
我已将 antd 安装到我的 typescript 项目中:
"antd": "^4.6.2",
它工作正常,我的项目使用 antd 组件(用于构建的 webpack)构建,但在 VSCode 中我没有输入,它给了我这个错误:
这是我的 tsconfig.json
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"module": "es6",
"target": "es5",
"jsx": "react",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"moduleResolution": "node",
}
}
我做错了什么? Antd 本来就是要包含它自己的类型,那为什么 VSCode 不能识别呢?
【问题讨论】:
标签: reactjs typescript visual-studio-code antd