AI Hints
Home›TypeScript Tutorial
Free course

TypeScript Tutorial

Learn TypeScript from zero, one small and easy step at a time. Every idea is explained in plain words, then shown in real code, checked by the real TypeScript compiler, with real output and real errors.

📚 120 lessons▶ 1:35:47+ of video💻 137 code examples🖼 124 screenshots
The complete TypeScript course, free on YouTubeWatch on YouTube ↗

Course contents

Every lesson has its own page with the explanation, code you can copy, the real output, screenshots from the video, and a link that jumps straight to that moment in the video.

1. Getting Started

  1. What Is TypeScript0:00
  2. Why Types Help0:56
  3. How It Runs2:07

3. Basic Types

  1. Basic Types5:58
  2. Arrays6:47
  3. Tuples7:30

4. Escape Hatches and Nulls

  1. any and unknown8:10
  2. null and undefined9:10
  3. Basics Quiz10:03

6. More About Functions

  1. Rest Parameters13:14
  2. Function Types13:47
  3. void and never14:28

7. Object Types

  1. Object Types15:16
  2. Optional Properties16:06
  3. readonly16:52

8. Aliases and Interfaces

  1. Type Aliases17:40
  2. Interfaces18:29
  3. Aliases or Interfaces19:01

10. Cart Practice and Unions

  1. Practice: A Shopping Cart22:01
  2. Objects Quiz22:36
  3. Union Types23:48

12. Literal and Discriminated Unions

  1. Literal Types26:53
  2. Discriminated Unions27:40
  3. Exhaustive Checks28:18

13. Type Guards and Practice

  1. Type Guards29:09
  2. Practice: Payment Results30:02
  3. Unions Quiz30:39

14. Enums and Assertions

  1. Enums31:51
  2. as const32:39
  3. Type Assertions33:29

16. Classes and Contracts

  1. Implementing Interfaces36:29
  2. Inheritance37:16
  3. Abstract Classes38:04

17. More About Classes

  1. Static Members38:44
  2. Getters and Setters39:18
  3. Classes Quiz39:53

20. Generics Practice and keyof

  1. Practice: A Typed Store45:01
  2. Generics Quiz45:39
  3. keyof46:56

21. Type Operators

  1. typeof Types47:39
  2. Indexed Access Types48:14
  3. Mapped Types48:51

22. Utility Types

  1. Partial and Required49:39
  2. Pick and Omit50:21
  3. Record50:49

23. Types from Types

  1. ReturnType and Parameters51:24
  2. Conditional Types52:02
  3. infer52:52

24. Template Types and Practice

  1. Template Literal Types53:26
  2. Practice: Utility Types54:21
  3. Advanced Types Quiz54:58

26. Configuration and Packages

  1. tsconfig.json59:05
  2. Strict Mode59:58
  3. npm Packages and @types1:00:49

27. Async and Outside Data

  1. Promises and async1:01:40
  2. Typing JSON1:02:18
  3. Errors in catch1:03:11

28. Validation and Zod

  1. Validating Data1:03:54
  2. Zod1:04:48
  3. Practice: An API Client1:05:31

29. Overloads and Events

  1. Function Overloads1:06:12
  2. Type-Safe Events1:06:57
  3. Tooling Quiz1:07:41

30. Precise Types

  1. satisfies1:08:53
  2. Branded Types1:09:40
  3. Readonly Arrays1:10:17

31. Patterns

  1. Result Types1:10:58
  2. Node with TypeScript1:11:45
  3. Patterns Quiz1:12:16

32. Testing, Migrating, Mistakes

  1. Testing with Types1:13:26
  2. Migrating JavaScript1:14:19
  3. Common Mistakes1:15:07

33. Project: Types and Validation

  1. Project: The Plan1:15:54
  2. Project: Types1:16:54
  3. Project: Validation1:17:40

34. Project: Store, Rules, Errors

  1. Project: The Store1:18:28
  2. Project: Services1:19:19
  3. Project: Errors1:20:15

35. Project: Events, Reports, Async

  1. Project: Events1:21:12
  2. Project: Reports1:22:12
  3. Project: Async1:22:59

36. Project: Tests, CLI, Refactoring

  1. Project: Tests1:23:43
  2. Project: A CLI1:24:29
  3. Project: Refactoring1:25:21

37. Project: Final Run

  1. Project: Strictness1:26:08
  2. Project: Final Run1:27:04
  3. Project Review1:27:42

38. Habits and Library Types

  1. Best Practices1:28:31
  2. Performance of Types1:29:23
  3. Reading Library Types1:30:13

39. Cheat Sheets and Interviews

  1. Cheat Sheet: Basics1:31:08
  2. Cheat Sheet: Advanced1:31:55
  3. TypeScript Interview Questions1:32:36

40. Ecosystem and Next Steps

  1. The TypeScript Ecosystem1:33:42
  2. Final Quiz1:34:32
  3. What to Learn Next1:35:47