In this article I will show you how to write safer TypeScript
code by leveraging a feature called strictNullChecks. It's quite easy to miss because it's turned off by default, but can help a lot to produce more robust code. I'll also briefly introduce another lesser-known feature of the language called type guards.
. I remember when starting a new project with GWT
and being quite amazed by the possibility of using Java on both sides.
To experiment with these tradeoffs, I decided to use TypeScript for a new React
project. The application is a web SPA which is the front end for a typical SAAS. Users can register/login, adding credit cards, managing api keys, see billing information, etc. All the examples in this article will be from that project and have React+Redux context.
06 January, 2017