Přeskočit na hlavní obsah

Strict mode

Strict mode improves maintainability and helps you catch bugs ahead of time. Additionally, strict mode applications are easier to statically analyze and can help the ng update command refactor code more safely and precisely when you are updating to future versions of Angular. Every application should enable and use strict mode.

In tsconfig.json file add following to compilerOptions:

  • "forceConsistentCasingInFileNames": true,
  • "noImplicitReturns": true,
  • "strict": true,
  • "noUnusedLocals": true