DiscoveryVIPAll interactive guides ↗

TYPESCRIPT CONFIDENCE LAB

Catch the mismatch.
Keep the momentum.

Turn JavaScript knowledge into safer code. Repair real type errors, explore what the compiler knows, and build a contract for data you can actually trust.

Real compiler24 lessons8 repair missionsExport your work
app.tsCHECK → UNDERSTAND → REPAIR
// A small contract. A useful catch.
let quantity: number = "three";

// Make the data match the intent.
let quantity: number = 3;

Confidence comes from understanding
what the check can—and cannot—prove.

0 / 24 lesson checks0 / 8 type contracts repaired

REAL TYPESCRIPT. VISIBLE FEEDBACK.

Think, edit, check.

Edit the source and ask the compiler what it finds. This single-file workspace checks types and emits JavaScript; it never executes your code. Third-party imports and JSX are outside this lab’s scope.

Use the keyboard normally; Tab moves to the next control. Your draft is saved in this browser.

Bundled TypeScript 5.9.3. The first check loads the compiler and standard type libraries from this site. A background worker keeps checking off the page’s main thread; a time limit stops unusually expensive checks.

Compiler findings

Run a check to see diagnostics.

Types the compiler sees

Shows top-level variables and functions, not every intermediate expression.

Emitted JavaScript

Check a valid example to see the output.

Output is withheld when the compiler reports errors. Passing type checks does not prove runtime behavior is correct.

Keep your progress

TypeScript Confidence Lab

Repair real type errors, inspect inferred types and build runtime data validators with a local TypeScript compiler.

What you can practice

Suggested experience: Beginner friendly. Interactive activities require JavaScript.

Choose your next learning path · About the educator