Angular 如何在TypeScript中禁用/抑制库中的错误?

Angular 如何在TypeScript中禁用/抑制库中的错误?,angular,typescript,compiler-errors,Angular,Typescript,Compiler Errors,我打开了一些编译器开关来报告代码中的更多问题(例如,严格的空检查)。但我在使用过的库中发现了数十个错误,例如: [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[] | Typ

我打开了一些编译器开关来报告代码中的更多问题(例如,严格的空检查)。但我在使用过的库中发现了数十个错误,例如:

[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>'.
[default]xxx/node_modules/@angular/core/src/util/decorators.d.ts:11:5

属性“扩展”为“类型”,因为我的问题更广泛。我不是问如何禁用库中的一个特定检查(
noImplicitAny
),而是如何禁用库中的所有检查。然而,这个问题的答案也适用于我的问题-
“skipLibCheck”:true
禁用库中的所有检查。

虽然这个问题与那边的答案不同,但确实解决了我的问题

编辑
tsconfig.json

{
    "compilerOptions": {
        "skipLibCheck": true,
        ...
    },
    ...
}
可能重复的