我正在使用Typescript 2.4.1并在我的项目中升级了许多包.其中我将Angular从2升级到4.3.1.在@types包中进行了许多更正之后,我留下的错误是:
\node_modules\@types\jquery\index.d.ts(2955,63): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(767,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(771,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(775,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(779,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(783,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(787,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(791,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(795,24): error TS2304: Build:Cannot find name 'Iterable'.
\node_modules\@types\three\three-core.d.ts(799,24): error TS2304: Build:Cannot find name 'Iterable'.
Run Code Online (Sandbox Code Playgroud)
我找到了许多类似的问题和答案,目前的解决方案是针对"es2015"和/或添加lib:["dom","es2015","es2015.iterable"].我已经尝试了所有这些以及更多,但仍然留下相同的'Iterable'错误.
我更新的tsconfig.json是这样的:
{
"compileOnSave": true,
"compilerOptions": {
"declaration": …Run Code Online (Sandbox Code Playgroud)