【发布时间】:2017-03-08 20:00:24
【问题描述】:
我已打开一些编译器开关以报告代码中的更多问题(例如,严格的 null 检查)。但是我在使用的库中遇到了数十个错误,例如:
[default] xxx/node_modules/@angular/core/src/util/decorators.d.ts:11:5
Property 'extends' of type 'Type<any> | undefined' is not assignable to string index type 'Function | any[] | Type<any>'.
是否有任何方法可以抑制/静音/禁用库中的错误检查(例如目录 node_modules)?
它不能与Allow implicit any only for definition files 重复,因为我的问题要广泛得多。我不是在问如何在库中禁用 一个 特定检查 (noImplicitAny),而是在问如何在库中禁用 all 检查。然而,该问题的答案也适用于我的 - "skipLibCheck": true 禁用库中的所有检查。
【问题讨论】:
标签: angular typescript compiler-errors