TypeScript for JavaScript Developers Part 15: Type Guards
Channel: Jeremy Likness
Date: 2019-03-14

Type guards allow code to test that a variable is of a specific type. If the test succeeds, TypeScript's compiler understands the variable has the characteristics of that type within a block of code. This makes it possible to catch defects and provide context-specific auto-completion in the code block.

Learn more about type guards: https://jlik.me/ffu