How this TypeScript track works
- Beginner — annotate values with types; use
printOutput(...)in the playground. Type errors show in the terminal when you click Run in browser. - Intermediate — interfaces, generics, narrowing, and
tsconfigstrict flags. - Advanced — utility types, discriminated unions, declaration files, and a typed API mini-project.
Prerequisite: comfort with the JavaScript track. TypeScript is JavaScript plus static types.
Install on your device (macOS, Linux, Windows)
Lessons run in your browser on this site—install a modern browser and optional editor for local projects.
macOS
- Use Safari (preinstalled) or install Google Chrome / Firefox.
- Optional editor: VS Code (
brew install --cask visual-studio-code). - Open DevTools with ⌥⌘I (Chrome/Edge) or ⌥⌘C (Safari Web Inspector).
Linux
- Install Chromium or Firefox:
sudo apt update && sudo apt install -y chromium-browser firefox(Debian/Ubuntu; package names vary by distro). - Fedora:
sudo dnf install -y chromium firefox. - Optional editor: VS Code from code.visualstudio.com or
sudo snap install code --classic.
Windows
- Install Microsoft Edge or Chrome.
- Optional editor: VS Code (
winget install Microsoft.VisualStudioCode). - Open DevTools with F12 or Ctrl+Shift+I.
Verify: Open any lesson playground and click Run—output appears without installing a compiler.
Local compile (optional): npm install -g typescript then tsc --init and tsc.
TypeScript is a typed superset of JavaScript. You write .ts files with type annotations; a compiler removes types and emits plain JavaScript browsers and Node already run.
Why teams adopt it
- Catch mistakes early — typos on properties, wrong argument types, missing fields.
- Better editor support — autocomplete, rename, and inline docs from types.
- Living documentation — function signatures explain intent without a separate doc drift.
Playground here
Click Run in browser. Your TypeScript is compiled in the browser, then executed. Use printOutput(...) for the terminal panel—same as the JavaScript track.
First program
const message: string = 'Hello, TypeScript!';
printOutput(message);Challenge
First typed variable
- Declare
const count: number = 3. - Print it with
printOutput.
Done when: terminal shows the number.
Interview prep
- What is TypeScript?
A typed superset of JavaScript that compiles to plain JS. Types are checked at build time and erased in output.
- Does TypeScript run in the browser directly?
Browsers run the emitted JavaScript. You compile first (locally or in this playground) before execution.