slug: typescript-fundamentals
title: "TypeScript — Types That Catch Bugs Before Runtime"
version: 1.0.0
description: "Add static typing to JavaScript — interfaces, generics, and type narrowing."
category: languages
tags: [typescript, javascript, types, static-analysis, generics]
difficulty: beginner

xp:
  read: 10
  walkthrough: 30
  exercise: 20
  quiz: 15
  quiz-perfect-bonus: 10
  game: 20
  game-perfect-bonus: 10

time:
  quick: 5
  read: 15
  guided: 45

prerequisites: []
related: [react-fundamentals, clean-code]

triggers:
  - "What is TypeScript?"
  - "How do I add types to JavaScript?"
  - "What are generics in TypeScript?"
  - "How do interfaces work in TypeScript?"

visuals:
  diagrams: [diagram-mermaid]
  quiz-types: [quiz-fill-blank, quiz-timed-choice]
  game-types: [speed-round, classify]
  playground: javascript
  web-embeds: true

sources:
  - url: "https://www.typescriptlang.org/docs/"
    label: "TypeScript Docs"
    type: docs
  - url: "https://www.typescriptlang.org/play"
    label: "TypeScript Playground"
    type: docs
