我已将我的应用程序升级到最新的 Angular 4 (beta-8) 版本。但是我一直有以下错误:
@angular\core\src\change_detection\differs\iterable_differs.d.ts:14: TS2304 Cannot find name 'Iterable'
我确实查看了更改日志并发现:
Iterable<T>
现在需要定义才能正确编译 Angular 应用程序。Iterable<T>
运行时不需要支持,但类型定义Iterable<T>
必须可用。
我应该在这里使用什么作为 Iterable 定义?
编辑:
tsconfig.json
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
/* for reading your ts source while debugging from a browser */
"sourceMap": true,
/* the following two settings are required for angular2 annotations to work*/
"emitDecoratorMetadata": true,
"experimentalDecorators":true,
/* noImplicitAny when you want your typescript to be fully typed */
"noImplicitAny":false,
"suppressImplicitAnyIndexErrors":true,
"noFallthroughCasesInSwitch":true,
"noImplicitReturns":true,
"outDir": "./target/ts"
}