What you need first

Solid JavaScript: closures, this, modules, promises. This course teaches the type system, not the language. Bring a project you already have.

Modules

  1. Why types. The classes of bug a compiler catches and the ones it cannot, so you know what you are buying.
  2. Primitives, unions and literals. Narrow types, string literal unions, and unknown versus any.
  3. Interfaces and type aliases. Structural typing, excess property checks, and when to pick an alias.
  4. Narrowing. typeof, in, discriminated unions, and exhaustive checks that fail the build when a case is added.
  5. Generics. Constraints, defaults, and the point at which a generic stops helping.
  6. Utility types. Partial, Pick, Omit, Record, and deriving types from one source of truth.
  7. Strict mode. Turning on strict, noUncheckedIndexedAccess and exactOptionalPropertyTypes, one at a time.
  8. Migration. Converting a JS file incrementally, typing the boundary, and stopping the leak of any.

How it is assessed

Each module ends with a broken file to repair under strict. The final project is a typed module boundary with a runtime validator on the untrusted edge.

Questions people ask before starting

Do I need React or a framework?

No. Every exercise is a plain module compiled with tsc. Frameworks add their own type layers on top and would obscure which behaviour comes from the type system and which from the framework's conventions.

Can I use this on an existing JavaScript project?

Yes, and module eight is written for exactly that. Convert one file at a time, type the boundary, and keep strict scoped to converted directories until the whole tree passes.

How long is each module?

Two to four hours. Module seven is the slow one because each strictness flag surfaces a wave of real defects; budget a full day for it and resist turning flags back off mid-way.

Where to go next

After the capstone, the useful direction is either runtime validation libraries or build-level enforcement. Both assume the strict compile already passes. If you want to keep going on the same boundary, add a schema-driven codec, then delete the hand-written interface and confirm the inferred type still fails when the validator changes shape. That exercise is the whole point of deriving types from one source.

TypeScript Code Editor



      
Compiler Output