Skip to content

Module 06: TypeScript Fundamentals

TypeScript's type system from scratch: primitive types, interfaces, type aliases, union and intersection types, type narrowing, generics basics, and the TypeScript compiler.

This module is planned. Full content coming soon.

Prerequisites

  • Module 05: Browser and DOM (or Module 04 at minimum)

What You'll Learn

  • Setting up a TypeScript project with tsconfig.json; the tsc compiler and ts-node
  • Primitive types, array types, tuple types, and the unknown vs any vs never types
  • Interfaces and type aliases: defining object shapes, optional properties, readonly properties, index signatures
  • Union types (A | B) and intersection types (A & B)
  • Type narrowing: typeof, instanceof, type guards, discriminated unions
  • Generics: writing generic functions and generic interfaces; type constraints with extends
  • Enums: numeric and string enums, and when to use const enums