TypeScript 7 for Beginners

This program teaches TypeScript 7 to developers who know a little JavaScript and no TypeScript. Every example is typed on screen, checked by the compiler and run in Node, with TypeScript pinned at exactly 7.0.2, so what you see is what you install. You start from an empty folder: install Node.js and npm, compile your first file, and learn to read compiler errors, strict mode and tsconfig.

json. Next come the types you meet in real code: arrays, tuples, objects, unions and narrowing, null and unknown. Then you write reusable code with typed functions, generics, classes and ES modules. With the language in hand, you set up a professional toolchain with Node’s test runner, Vitest, type tests, Oxlint, Prettier, npm scripts and CI, and learn to trust data from outside your program by validating JSON, files, HTTP responses and environment variables with Zod. Each course builds a small project of its own: a unit converter, a typed shopping cart, a typed library, a reusable project template and a validated data loader. Taken in order, the courses take you from your first type error to a command-line tool you build, test, package and install with npm.

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.