Syllabus

  1. 01TypeScript ConfigurationSet TypeScript up for real work: how editors use it, running tsc on the command line, adding TypeScript to a project with npm and tsconfig.json, and the compiler options and comment directives you'll meet most.5 lessons
    1. 01TypeScript in Your Editor
    2. 02The tsc Command
    3. 03TypeScript in a Project
    4. 04Common Compiler Options
    5. 05Quiz: TypeScript Configuration
  2. 02TypeScript Class TypesType your classes: annotate fields and constructors, control access with public, private and protected, protect data with readonly, and shorten classes with parameter properties.6 lessons
    1. 01Typed Class Fields
    2. 02public and private
    3. 03protected
    4. 04readonly and Parameter Properties
    5. 05Project: Ticket Office
    6. 06Quiz: Class Types
  3. 03Intermediate Type NarrowingTeach TypeScript about your own checks: write type predicates, narrow with equality checks against literals, null and undefined, model data as discriminated unions, and let the compiler prove every case is handled.6 lessons
    1. 01Type Predicates
    2. 02Equality Narrowing
    3. 03Discriminated Unions
    4. 04Exhaustiveness Checking
    5. 05Project: Drone Dispatch
    6. 06Quiz: Intermediate Type Narrowing
  4. 04TypeScript GenericsGo further with generics: write generic classes, give type parameters defaults, constrain them with extends, and use keyof to work safely with property names.6 lessons
    1. 01Generic Classes
    2. 02Type Parameter Defaults
    3. 03Generic Constraints
    4. 04keyof and Type Parameters
    5. 05Project: Typed Data Store
    6. 06Quiz: Generics