Skip to content
Learn Netverks

Lesson

Step 1/32 3% through track

intro

Introduction to TypeScript

Last reviewed May 28, 2026 Content v20260528
Track mode
client_typescript
Means
In-browser TS
Reading
~2 min
Level
beginner

This lesson

An orientation to this TypeScript lesson—scope, vocabulary, and what you will practice next.

You need a clear map of the TypeScript track so later lessons do not feel like isolated tricks.

You will apply Introduction to TypeScript in contexts like: Modern front-end apps, Node APIs, and any team that standardizes on TS-first tooling.

Write TypeScript, compile in the browser, run the emitted JavaScript, and check understanding with MCQs. Also open the interview prep blocks.

Start here at the beginning of the typescript track before skipping ahead.

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 tsconfig strict 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

  1. Use Safari (preinstalled) or install Google Chrome / Firefox.
  2. Optional editor: VS Code (brew install --cask visual-studio-code).
  3. Open DevTools with ⌥⌘I (Chrome/Edge) or ⌥⌘C (Safari Web Inspector).

Linux

  1. Install Chromium or Firefox: sudo apt update && sudo apt install -y chromium-browser firefox (Debian/Ubuntu; package names vary by distro).
  2. Fedora: sudo dnf install -y chromium firefox.
  3. Optional editor: VS Code from code.visualstudio.com or sudo snap install code --classic.

Windows

  1. Install Microsoft Edge or Chrome.
  2. Optional editor: VS Code (winget install Microsoft.VisualStudioCode).
  3. 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

  1. Declare const count: number = 3.
  2. 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.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What part of this lesson needs a second read?
  • What would you try differently in a real project?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump