更新到角度2 RC后,我得到以下错误:
error TS7008: Member 'summary' implicitly has an 'any' type.
在这行:
@input() summary;
怎么了?
也许您更改了TypeScript编译器配置中noImplicitAny属性的值…请参阅tsconfig.json文件:
{ "compilerOptions": { "target": "es5","module": "commonjs","moduleResolution": "node","sourceMap": true,"emitDecoratorMetadata": true,"experimentalDecorators": true,"removeComments": false,"noImplicitAny": false // <----- },"exclude": [ "node_modules","typings/main","typings/main.d.ts" ] }
@input() summary:string;