From Angular 10 (experimental) / 11 (default on create new app) you can get strict mode. In summary it reduces the bundle size (by 75%!) and increases the maintainability by disabling you to create objects of type ‘any’ (no untyped types)…
Angular 11+ CLI creates all new workspaces and projects with strict mode enabled.
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.Specifically, strict mode does the following:
-
Enables
strict
mode in TypeScript, as well as other strictness flags recommended by the TypeScript team. Specifically,forceConsistentCasingInFileNames
,noImplicitReturns
,noFallthroughCasesInSwitch
. -
Turns on strict Angular compiler flags
strictTemplates
,strictInjectionParameters
andstrictInputAccessModifiers
. -
Bundle size budgets have been reduced by ~75%.
More info:
https://angular.io/guide/strict-mode
Angular CLI Strict Mode. In Angular, we strongly believe in… | by Minko Gechev | Angular Blog