Front-end web development

TypeScript: typing your JavaScript applications

Make your code reliable with static typing: types, classes, generics, modules and tooling.

Request this program
Duration
21 h · 3 days
Level
Intermediate
Format
On site · Remote · Blended
Max. group size
12 participants

Overview

This program teaches how to write applications in TypeScript: type system, inference, interfaces, classes, generics, modules and definition files. Participants set up their tooling, gradually migrate existing JavaScript and discover decorators, before integrating TypeScript into a modern build chain.

Who this program is for

  • JavaScript developers wishing to make their code more reliable
  • Teams adopting Angular, React, Node.js or NestJS
  • Front-end architects

Prerequisites

  • Very good knowledge of modern JavaScript
  • Notions of object-oriented programming

Learning objectives

  • Install and configure the TypeScript compiler
  • Type variables, functions, objects and arrays
  • Use interfaces, aliases, unions and utility types
  • Design classes and generics
  • Organize code into modules and use definition files
  • Integrate TypeScript with Vite or esbuild

Detailed curriculum

6 modules · 21 h · 3 days

Day 1
Discovering TypeScript and its tooling3.5 h
50% theory · 50% practice
  • Why type: benefits and limits
  • Installation, tsconfig and compiler options
  • Transpilation and source maps
  • Editor integration
  • Migration strategy for an existing project
The type system3.5 h🛠 1 workshop
30% theory · 70% practice
  • Primitive types, arrays, tuples and enumerations
  • Type inference
  • Unions, intersections and literal types
  • Typing functions and optional parameters
  • any, unknown, never and type guards
🛠 Hands-on workshops
Type a dataset1.5 h

Add types to an existing JavaScript script.

✅ Deliverable : A fully typed script
Day 2
Interfaces, classes and generics3.5 h🛠 1 workshop
30% theory · 70% practice
  • Interfaces and type aliases
  • Classes, access modifiers and inheritance
  • Abstract classes and implementing interfaces
  • Generics and constraints
  • Utility types: Partial, Pick, Omit, Record
🛠 Hands-on workshops
Generic library1.5 h

Create generic, typed data structures.

✅ Deliverable : A typed mini-library
Modules and definition files3.5 h
50% theory · 50% practice
  • ES modules in TypeScript
  • Ambient declarations and .d.ts files
  • Typing a third-party JavaScript library
  • Mixins and composition
  • Publishing and consuming types
Day 3
Decorators3.5 h🛠 1 workshop
30% theory · 70% practice
  • Principle of decorators and standard syntax
  • Class, method, property and parameter decorators
  • Decorator factories and composition
  • Use cases in frameworks
  • Limits and best practices
🛠 Hands-on workshops
Validation decorators1.5 h

Write decorators to validate and log.

✅ Deliverable : A set of reusable decorators
Integration into a modern toolchain3.5 h🛠 1 workshop
30% theory · 70% practice
  • Vite or esbuild project with TypeScript
  • Linter, formatter and typed tests
  • Strict configuration and best practices
  • Typing an API and its responses
  • Capstone project
🛠 Hands-on workshops
Complete typed application2 h

Assemble a small, fully typed web application.

✅ Deliverable : A built TypeScript application

Tools and technologies

Node.jsTypeScriptVisual Studio Code

Teaching methods

  • Alternating short lectures and hands-on work
  • Live demonstrations by the trainer
  • Capstone project built throughout the modules
  • Group corrections and discussion of best practices

Assessment

  • Hands-on exercises corrected in each module
  • Mini-project completed at the end of the course
  • Knowledge-check quiz

Required equipment

  • A computer with an internet connection
  • A code editor and Node.js installed

Resources provided

  • Course materials and repository of corrected exercises

Career outcomes

  • A fully typed application
  • A migration plan for a JavaScript project
  • More readable, better-equipped code