Type Guards

Type guards are a way to narrow down the type of a variable. This is useful when you want to do something different depending on the type of a variable.

Learn more from the following resources: