Request : Progressive support for strictNullCheck #11386
Labels
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
Suggestion
An idea for TypeScript
Feature Request/Suggestion
As an existing user of TypeScript, I would like to be able to gradually enable the new compiler options for strict null check in my project. As of now, the only way to do this that I'm aware of is to set the global flag strictNullCheck to true for the compiler, for the whole project.
For an already existing project with a big codebase, this becomes a monumental task to fix every single file before being able to use this feature going forward.
TypeScript Version : Currently using 2.0.3
Expected behaviour
Add support for special annotation in
.ts
files, a bit like Facebook's Flow annotation system.For example, if the first line in a file contains an annotation like this :
This would tell the compiler to activate this option for this file only.
This could very well be expanded for other compiler options.
This would allow a big codebase to gradually migrate less painfully.
The text was updated successfully, but these errors were encountered: