Re:Announcing TypeScript 2.0 Beta
by Analemma_ on Monday July 11, 2016 @01:43PM
(#12072800)
It's a tough call, and I can see arguments for both sides. On the other side, one of the big selling points of TypeScript is that you can take your existing huge JavaScript codebase, and with little effort turn it into TypeScript with all the types being "any", then gradually add strong types as time permits. This wouldn't work if --strictNullChecks was the default and would add one more step to the migration process.
[ Parent
| on HN ]
`null` and `undefined` are subtypes of `any`, so you can still gradually convert to typescript.
(according to https://github.com/Microsoft/TypeScript/pull/7140)
I don't use TypeScript, but with Flow (which has always disallowed nulls in built-in and user-defined types by default), "null" is a subtype of "any", so that would still work. Is this not the case in TypeScript with --strictNullChecks?