Chapter · 2 lessons
TypeScript
Where types go, union types and narrowing, states as discriminated unions and safe handling of data from outside. Before you meet types in the React lessons.
TypeScript basics
TypeScript 01Where the type goes (TypeScript syntax)When a colon, when <…>, when nothing. The anatomy of the syntax, a cheat sheet of situations and a fill-in exercise.TypeScript 02Types that change (unions and narrowing)Union types, narrowing with conditions, literal types, discriminated unions with a completeness check and unknown for data from outside.