LanguagesPopular

TypeScript for Application Developers

Go past annotations. Structural typing, narrowing, generics, and the type-level tools that make invalid states impossible.

  • Intermediate
  • 1h 55m
  • 4 modules
  • 12 lessons
  • 22.1k students

Taught by Daniel Okafor · TypeScript, PostgreSQL, API design, Data modelling

Cover image for TypeScript for Application Developers

What you’ll learn

  • Make invalid states unrepresentable

    Model your domain so the compiler rejects the combinations that should never happen.

  • Write real generics

    Build reusable functions and components that keep type information instead of erasing it.

  • Use the type-level toolkit

    Apply conditional, mapped, and template literal types where they earn their complexity.

  • Type the boundaries

    Validate and type the data crossing into your app, so external data stops being an any.

Course content

4 modules · 1h 55m

  1. 01How the Type System ThinksThe mental model underneath everything else: structural compatibility, unions, and narrowing.28m
    1. 1.1Structural typing and assignabilityFree12m
    2. 1.2Unions and narrowing10m
    3. 1.3Literal types and const assertions6m
  2. 02GenericsWriting code that keeps type information flowing through it instead of collapsing to any.24m
    1. 2.1Generic functions and inference13m
    2. 2.2Constraints and default type parameters4m
    3. 2.3Generic components in React7m
  3. 03Advanced TypesThe type-level features that let a type be computed from another type, and the judgement to use them sparingly.40m
    1. 3.1Conditional types and infer14m
    2. 3.2Mapped types and key remapping7m
    3. 3.3Template literal types19m
  4. 04TypeScript in PracticeConfiguration, external data, and the places typed code meets the untyped world.23m
    1. 4.1tsconfig and strictness settings10m
    2. 4.2Typing external data at the boundary7m
    3. 4.3Declaration files and untyped packages6m
Start with the first lesson