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.
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.
The course, in order
Open a unit in the map to inspect its activities. Reading, guided completion, independent work and review remain distinct evidence.
- Separate static types from runtime values
Use compiler feedback to describe accepted values, then check numeric domain rules before arithmetic.
Open this unit - 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 - 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 - 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 - 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 - Earn narrowing at the runtime boundary
Validate identifier and record representations before granting a narrower static type.
Open this unit - 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 - 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 - 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 - Read recursive shapes without acquiring mutation rights
Preserve literal relationships and recursively describe readonly trees while counting depth and size.
Open this unit - Expose precise function call contracts
Preserve typed pipeline relationships and implement two overloads with distinct return types and runtime dispatch.
Open this unit - Model function shapes and resolved outcomes
Infer function relationships, recursively unwrap promise-like values, and preserve rejection values without coercion.
Open this unit - 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 - Preserve transition and event identity
Implement typed transitions and connect each event name to its argument tuple and independent registration lifetime.
Open this unit - 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 - Separate scheduling order from tree combination
Use priority ordering deliberately and reuse one typed binary-tree traversal with different combining functions.
Open this unit - Preserve boundary and tie policies
Locate sorted boundaries and perform stable merge sort without changing original equal-item order.
Open this unit - 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 - 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 - Make migration and command replay intentional
Preserve populated migrated fields and reconcile command identity with revision-checked ledger effects.
Open this unit
