Welcome to Your First TypeScript: Types for JavaScript You Already Write. You’ve met TypeScript in packages, AI suggestions and job postings. In this course, you’ll add it to the JavaScript you write, with its checker as your reviewer.
The course follows Dee’s quote calculator at Spoke & Sprocket, a small bike-repair shop she runs with her brother. Her JavaScript prices repairs from parts, labor and a loyalty discount. Run as it is with node quote.js, two quotes come out wrong, and Kofi’s crashes the script:
Amara: $59.23
Luis: $57.49
Mei: $0.00
...
TypeError: Cannot read properties of undefined (reading 'totalCents')
In the course’s project, you’ll rename her script to TypeScript and fix what the checker finds. Then one command checks the code and reports nothing, and another runs it. Every quote matches the one Dee worked out by hand. You’ll set up both commands early in the course. Here’s what node quote.ts prints at the end:
Amara: $59.23
Luis: $65.48
Mei: $42.74
Kofi: $11.25
What You’ll Learn
By the end of this course, you’ll be able to:
- Set up a small Node project to check and run TypeScript
- Annotate functions and objects where inference needs help
- Read a type error back to its cause
- Say what
anygives up
Then you’ll use it all on Dee’s quote calculator.
Before You Start
You need the JavaScript you already write, including modules, JSON and npm projects, but no other typed language. You’ll also need a terminal and an editor with TypeScript support.
You’ll use Node 26, and you’ll install TypeScript 7 in Checking and Running a Project.
How the Course Works
The course mixes text lessons, short videos, coding exercises in your browser, and a final quiz. For the project, you’ll set up Dee’s code on your machine, then explain your types to an AI mentor that reviews them. The sample code and slides are a download on the course page.
First up is Checking Code Before It Runs, and how Dee’s quotes could have been caught sooner.