Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

Typescript

Learn how TypeScript layers a type system on top of JavaScript. You will set up the compiler, describe data with primitive, array, object and union types, and use interfaces, assertions and narrowing tools safely — all on one small task-tracker app.

Ready to learn6 sections · 24 lessons
Start learning

Course curriculum

Introduction to TypeScript4 lessons

See what TypeScript adds to JavaScript, install the compiler, run your first file three different ways, and mix typed and untyped code in one project.

  1. TypeScript vs JavaScript12 min
  2. Installing TypeScript and tsc12 min
  3. Running TypeScript: tsc, ts-node and the Playground12 min
  4. Mixing TypeScript and JavaScript12 min
Type Inference3 lessons

Learn which types TypeScript works out on its own, then control the compiler with tsconfig.json and the handful of options that matter most.

  1. How Type Inference Works12 min
  2. tsconfig.json12 min
  3. Compiler Options That Matter12 min
TypeScript Types5 lessons

Describe values with boolean, number and string, handle null, undefined and void, type arrays and tuples, give objects a shape, and name fixed sets of values with enums.

  1. boolean, number and string12 min
  2. null, undefined and void12 min
  3. Arrays and Tuples12 min
  4. Object Types and Classes12 min
  5. Enums12 min
Assertions and Type Compatibility3 lessons

Tell the compiler what you know with as, see why as any is a last resort and as const is a gift, and learn the structural rule that decides when one type fits another.

  1. Type Assertions with as12 min
  2. as any and as const12 min
  3. Type Compatibility: Shape Is What Counts12 min
Combining Types4 lessons

Say 'this or that' with unions, 'this and that' with intersections, give any type a name with an alias, and turn an object's keys into a type with keyof.

  1. Union Types12 min
  2. Intersection Types12 min
  3. Type Aliases12 min
  4. The keyof Operator12 min
TypeScript Interfaces5 lessons

Declare and extend interfaces, decide between an interface and a type alias, and use any, unknown, never, the non-null assertion and satisfies without weakening your checks.

  1. Declaring an Interface12 min
  2. Extending Interfaces12 min
  3. Types vs Interfaces12 min
  4. any, unknown and never12 min
  5. Non-null Assertion and satisfies12 min