Topics in this subject

19 topics

TypeScript

0 of 19 complete 0%
01 2 min read

Mental Model and Setup

Understand what TypeScript is, how it works under the hood, and how to set it up.

02 3 min read

Basic Types and Primitives

Learn about string, number, boolean, array, tuple, any, unknown, never, and void.

03 2 min read

Type Inference and Assertions

How TypeScript automatically guesses types, and how you can override them using type assertions.

04 2 min read

Interfaces and Type Aliases

How to define the shape of objects using interface and type, and the differences between them.

05 3 min read

Functions and Signatures

Typing parameters, return values, optional parameters, and function overloads.

06 3 min read

Classes and Modifiers

Public, private, protected, readonly, and abstract classes in TypeScript.

07 2 min read

Union and Intersection Types

Combining multiple types using OR (|) and AND (&) operations.

08 2 min read

Literal Types and Enums

Restricting variables to exact values and organizing constant values.

09 2 min read

Type Guards and Narrowing

How to narrow down broader types (like unions) into specific types safely.

10 3 min read

Generics

Writing reusable components that can work over a variety of types.

11 3 min read

Utility Types (Part 1)

Built-in generic helpers to transform existing types (Partial, Required, Readonly, Record).

12 2 min read

Utility Types (Part 2)

Advanced utility types for extracting/removing fields and inferring function types (Pick, Omit, Extract, Exclude, ReturnType).

13 2 min read

Mapped Types

Looping through keys to create dynamic type maps (the engine behind utility types).

14 3 min read

Conditional Types

Using ternary operators in types (T extends U ? X : Y) and infer keyword.

15 3 min read

Modules and Namespaces

Importing/Exporting types, difference between value and type imports, and declaration files.

16 3 min read

React with TypeScript

Typing Props, Hooks, and Events in React functional components.

17 3 min read

tsconfig.json and Compiler Options

Understanding the most important rules inside the tsconfig.json file.

18 3 min read

Gotchas and Antipatterns

Common mistakes developers make in TypeScript and how to avoid them.

19 2 min read

TypeScript Cheat Sheet

A quick reference guide for common TypeScript syntax and features.