Stay Practiced.
Local toolsSite guideSettings
Curriculum

TypeScript: contracts at scale

Move from type fundamentals to safe domain models, generics, public APIs, asynchronous ownership, migrations and production boundary design.

20 units · Web, Plus, Pro · 20 programming subjects + 2 security tracks

Branches show this unit’s authored theory, coding and assessment work.

Select a node. Drag the background to pan.100%

Unit 1 / 20

Separate static types from runtime values

Use compiler feedback to describe accepted values, then check numeric domain rules before arithmetic.

0 prerequisite skills · Reading, guided completion and independent success remain separate evidence.

Open this unit

The course, in order

Open a unit in the map to inspect its activities. Reading, guided completion, independent work and review remain distinct evidence.

  1. Separate static types from runtime values

    Use compiler feedback to describe accepted values, then check numeric domain rules before arithmetic.

    Open this unit
  2. Preserve optional fields and deliberate empty values

    Copy an update without changing the source, and distinguish removal, absence, and a present value.

    Open this unit
  3. Keep positional types and owned field types precise

    Build readonly typed pairs, then project known owned properties without widening their value types.

    Open this unit
  4. Keep collection absence separate from stored values

    Operate bounded storage without conflating missing entries with valid falsy payloads or exposing mutable snapshot containers.

    Open this unit
  5. Narrow tagged values and transition owned state

    Narrow each payment alternative by its literal tag, then use event alternatives to implement validated add, undo, and reset transitions.

    Open this unit
  6. Earn narrowing at the runtime boundary

    Validate identifier and record representations before granting a narrower static type.

    Open this unit
  7. Validate configuration and preserve unknown failures

    Admit configuration by its actual schema and narrow caught values without assuming that every throw is an Error.

    Open this unit
  8. Preserve success shapes and checked keys

    Propagate async result alternatives and use constrained property keys to retain a precise returned object type.

    Open this unit
  9. Keep type transformations aligned with runtime keys

    Express mapped-property modifiers and implement prefixed string-key projection under the same declared boundary.

    Open this unit
  10. Read recursive shapes without acquiring mutation rights

    Preserve literal relationships and recursively describe readonly trees while counting depth and size.

    Open this unit
  11. Expose precise function call contracts

    Preserve typed pipeline relationships and implement two overloads with distinct return types and runtime dispatch.

    Open this unit
  12. Model function shapes and resolved outcomes

    Infer function relationships, recursively unwrap promise-like values, and preserve rejection values without coercion.

    Open this unit
  13. Keep callable variance and route names explicit

    Check unsafe function substitutions, then align a literal route-name type with the corresponding runtime segment parser.

    Open this unit
  14. Preserve transition and event identity

    Implement typed transitions and connect each event name to its argument tuple and independent registration lifetime.

    Open this unit
  15. Bound async work and fence obsolete publication

    Keep batch execution bounded and let only the current search publish its eventual success or failure.

    Open this unit
  16. Separate scheduling order from tree combination

    Use priority ordering deliberately and reuse one typed binary-tree traversal with different combining functions.

    Open this unit
  17. Preserve boundary and tie policies

    Locate sorted boundaries and perform stable merge sort without changing original equal-item order.

    Open this unit
  18. Keep numeric units and identity domains distinct

    Validate exact money and branded identifiers at their admission boundaries instead of trusting interchangeable runtime representations.

    Open this unit
  19. Project types and reject stale entity writes

    Keep mapped shapes precise, return detached entity records, and compare expected revision before applying a patch.

    Open this unit
  20. Make migration and command replay intentional

    Preserve populated migrated fields and reconcile command identity with revision-checked ledger effects.

    Open this unit
TheoryHands-on codingEvidence / reviewTechnical wikiMembership access