TypeScript internally makes use of type widening and type narrowing. Type narrowing reduces the possibilities of values which a variable can take. The opposite case is called type widening. This video shows you these special cases and how to work with them.
Timeline:
00:00 Wide Types & Narrow Types
02:10 Type Widening & Type Narrowing
02:46 Type Widening in Variables
05:45 Type Widening in Arrays
07:37 Type Widening in Functions
09:55 Type Narrowing for union types
13:34 Type Widening in Literals
TypeScript errors being shown: TS2322, TS2345 & TS2367.