Description
In this course, you will learn :
It introduces you to advanced TypeScript concepts such as compiler flags to catch more errors, generic types, and how to compose types with discriminated unions.
Confident in your TypeScript skills after completing this course.
Able to write types that detect entire classes of potential runtime errors. Typing even the most difficult JavaScript code will become second nature to you, and you'll be fluent in TypeScript error messages.
Syllabus :
1. Strict types
- No Implicit `any`
- Fixing `noImplicitAny` Errors
- The `unknown` Type
- Strict Null Checks
- Optionality
- Strict Property Initialization
- Non-Null Assertion Operator
- Exercise in Strictness
2. Generics
- Function Types
- Generic Functions
- Generic Functions Example - Typing `reduce`
- Generic Interfaces - OOP Perspective
- Generic Interfaces - FP Perspective
- Type Argument Constraints
- Type Constructors
- Type Argument Propagation
3. Composing types
- Union and Intersection Types
- Discriminated Union Types
- Discriminated Unions in Practice
- State Machines
- Discriminated Unions vs Subtyping
4. Advanced types
- Conditional Types Introduction
- Built-in Conditional Types
- The `infer` Keyword
- Conditional Types Example - React Component Props
- Mapped Types Introduction
- Built-in Mapped Types
- Type Guards
- Custom Type Guards
- Nominal Types
5. TypeScript in practice
- Debugging Errors: Type Assignability
- Debugging Errors: Narrowing Types
- Debugging Errors: Unintuitive Error Message
- React and TypeScript: `useState` Hook
- React and TypeScript: `useReducer` Hook
- RxJS and TypeScript: `pipe`