TypeScript

TypeScript adds static types to JavaScript. You write types, the compiler catches mistakes, your editor gives better autocomplete. Any valid JavaScript is valid TypeScript - you can adopt it incrementally.

Overview

  • Language: Superset of JavaScript with static type annotations
  • Runtime: Compiles to JavaScript (runs anywhere JS runs)
  • Install: npm install -D typescript (project) or use a bundler like Vite that handles it
  • Config: tsconfig.json controls compiler behavior
  • Ecosystem: All JavaScript libraries work; most have type definitions via @types/*

Contents

Resources

Pages in this topic