TypeScript Advanced Types: Type Guards

Various ways to check the data type of an object

John Au-Yeung
Better Programming
Published in
5 min readJan 13, 2020

--

Photo by Linda Finkin on Unsplash

TypeScript has many advanced type capabilities which make writing dynamically typed code easy. It also facilitates the adoption of existing JavaScript code since it lets us keep the dynamic capabilities of JavaScript while using the type-checking capabilities of TypeScript.

--

--