Ram*_*ran 4 typescript angular strictnullchecks
我试图strictNullChecks在角度4应用程序中实现.
我刚才说 "strictNullChecks": true 的tsconfig.json
当我运行应用程序时,ng serve我得到以下错误.
ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:244:39
TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean |
undefined; } | undefined' has no property 'emitEvent' and no string index signature.
Run Code Online (Sandbox Code Playgroud)
出了什么问题?我们怎样才能
strictNullChecks在角4中实现?
启用时strictNullChecks,它会为包含库的所有TypeScript文件启用它.
要strictNullChecks在skipLibCheckAngCon CLI项目中启用,请在tsConfig中设置为true.
| 归档时间: |
|
| 查看次数: |
1187 次 |
| 最近记录: |