Command Palette

Search for a command to run...

Hectal
Phase 0Beginner1 of 18 in TypeScript

Start Here: Why TypeScript

What TypeScript is, the bugs it catches before your code runs, how the compiler checks and then erases types, TypeScript 7, and your first project.

This phase assumes you know some JavaScript and nothing about TypeScript. You'll see the problem TypeScript was built to solve: in JavaScript, many mistakes only show up when the code runs, often in front of a user. TypeScript finds them while you type.

You'll learn how the compiler works (it checks your code, then removes the types and leaves plain JavaScript), what changed in TypeScript 6 and 7, and how to set up a real project on your own computer.

Every example on these pages is checked by the real TypeScript compiler in your browser. Change the code: the Types panel shows exactly what tsc would say, and the Console shows what the code prints when it runs.

0/4 · 0%
4 topics ~80 min 11 code blocks & diagrams
Start with the first topic

Practise this phase

Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.