TypeScript

From basic types to advanced generics and utility types.

Beginner

  1. What is TypeScript?: JavaScript with an extra layer that checks the *shape* of your data before your code ever runs.
  2. Basic Types: The small set of built-in labels TypeScript uses to describe strings, numbers, booleans, arrays, and fixed-shape lists.
  3. Interfaces: A named description of what properties an object must have, and what type each one holds.
  4. Type Aliases: Giving any type — not just object shapes — a reusable name.
  5. Functions with Types: Annotating a function's parameters and return value so TypeScript can check every call against them.

Intermediate

  1. Union & Intersection Types: Combining types with `|` to mean "one of these" and with `&` to mean "all of these, merged."
  2. Generics: Writing a function or type once so it works with whatever type you feed it, while still keeping that type checked.
  3. Enums: A named set of related constant values, grouped under one type so you can refer to them by name instead of a raw value.
  4. Type Narrowing: How TypeScript figures out, step by step, which specific branch of a union type you're actually holding at a given point in the code.
  5. Utility Types: Built-in generic types that transform an existing type into a new one, so you don't have to redefine similar shapes by hand.
  6. Classes & Access Modifiers: Marking a class's properties and methods as `public`, `private`, or `protected` to control what code outside the class is allowed to touch.

Advanced

  1. Mapped Types: Building a brand-new type by looping over every property of an existing type and transforming each one the same way.
  2. Conditional Types: A type that resolves to one of two different types, chosen based on a check performed entirely at compile time.
  3. Declaration Files (.d.ts): A file that describes the shape of existing JavaScript code, without containing any actual implementation, so TypeScript can check code that uses it.
  4. tsconfig & Strict Mode: The configuration file that controls how the TypeScript compiler behaves, and the single setting that turns on its strongest safety checks.