Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 9 ngtypecheck

After update to angular 9 i receives Warnings:

\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.

my tsconfig.app.json:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "types": []
  },
  "files": ["main.ts", "polyfills.ts"],
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}

How to solve these warnings?

like image 674
jasnoh Avatar asked Jun 17 '20 16:06

jasnoh


People also ask

What is ngtypecheck ts file?

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.

How TypeScript is compiled to JavaScript in angular?

TypeScript is a primary language for Angular application development. It is a superset of JavaScript with design-time support for type safety and tooling. Browsers can't execute TypeScript directly. Typescript must be "transpiled" into JavaScript using the tsc compiler, which requires some configuration.


1 Answers

@Felix If you're using @angular-builders/custom-webpack package, warnings are caused due to @ngtools/webpack v9 dependency

GitHub issue has been already opened

like image 111
matteo.alborghetti.web.ddx Avatar answered Nov 11 '22 19:11

matteo.alborghetti.web.ddx