HNHacker News
TopNewBestAskShowJobs

snugbug

4 karma · joined November 20, 2013

submissionscomments
snugbug··on TypeScript 2.3
It is. I guess then you have to use the --strictNullChecks compiler flag to get the rest of the benefits
snugbug··on TypeScript 2.3
I hope TS adds native Swift-style optional values and chaining, where it fails at compile time if you try to access an optional without unwrapping it first. Conversely non-optional values cannot be null!

There are projects that add optional functionality (https://www.npmjs.com/package/ts-optional), but I don't see how it prevents you from setting regular values to null.