Categories
Basic TypeScript

Everyday Types

https://www.typescriptlang.org/docs/handbook/2/everyday-types.html

Categories
TypeScript

Type narrowing

In TypeScript, type narrowing is the removal of types from a union. To narrow a variable to a specific type, we use the type guard.  typeof Return values: Another check for array: Array.isArray() “in” operator JavaScript has an operator for determining if an object has a property with a name: the in operator. instanceof Type Predicates To define […]