This lesson introduces the --strictNullChecks compiler option and explains how non-nullable types differ from nullable types. It also illustrates how you can write safer code by being explicit about null and undefined in the type system. First of all…
For example you have a TS app: enum PaylerPosition { Guard, Forward, Center } interface Player { name: string; position: PlayerPosition; } let kobe = { name: 'Kobe', position: PlayerPosition.Guard }; The problem for this piece of code is that, you ca…