【发布时间】:2020-10-07 12:45:33
【问题描述】:
更新到 Angular 9 后,我收到警告:
\src\main.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
\src\polyfills.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
我的 tsconfig.app.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"files": ["main.ts", "polyfills.ts"],
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
如何解决这些警告?
【问题讨论】:
-
奇怪 - 我在 Ang 9 中没有这个警告,但我在升级到 Angular 10 后开始收到它