Feature #43525
closedmgr/dashboard: Enable compiler options used by Angular --strict flag
0%
Description
Recently Angular added a new flag to the "ng new" command, that adds 5 new typescript compiler options.
They add more strict rules that help the code to be more readable and less prone to errors.
The PR can be found here: https://github.com/angular/angular-cli/pull/14905
Rules added:
noImplicitAny - https://basarat.gitbooks.io/typescript/docs/options/noImplicitAny.html
noImplicitReturns - https://lucidchart.com/techblog/2018/06/20/how-to-actually-improve-type-safety-with-the-typescript-strict-flags/
noImplicitThis - https://logicbig.com/tutorials/misc/typescript/no-implicit-this.html
noFallthroughCasesInSwitch - https://typescriptlang.org/docs/handbook/release-notes/typescript-1-8.html
strictNullChecks - https://typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html
I would suggest to postpone strictNullChecks until we start using TS 3.7, since it introduces Optional Chaining and Assertion Functions [1], and I think that would simplify a lot the code.
Source: https://twitter.com/aaronfrost/status/1204820861573709824
[1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html
Updated by Tiago Melo over 4 years ago
- Status changed from New to In Progress
- Pull request ID set to 32553
Updated by Tiago Melo about 4 years ago
- Status changed from In Progress to Resolved
- Target version set to v15.0.0
Updated by Ernesto Puerta about 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 132 to General