编辑环境:vscode
- implicitly has an 'any' type错误:
tsconfig.json文件自动生成:tsc --init tsconfig.json文件中修改"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ - 编译总是报错,不能发现引入的模块:
检查tsconfig.json文件稳重中"target": "ES5",修改为"target": "ES2015"以上版本 - process找不到错误:
cnpm i -D @types/node
本文介绍如何在VSCode中解决TypeScript编译时出现的'any'类型错误及找不到引入模块的问题,通过修改tsconfig.json配置文件,将noImplicitAny设置为false,并调整目标版本为ES2015或更高。

1255

被折叠的 条评论
为什么被折叠?



