Free to read ยท Three levels
TypeScript: precise contracts and honest runtime boundaries
A complete path from JavaScript values and inference to generic library design, runtime validation, module integration, and measurable build behavior.
Start learningIn this course
Eighteen substantial lessons connect static types with actual JavaScript behavior through original worked examples, diagnostic reasoning, and solved exercises. The course treats type checking, emission, runtime validation, and authorization as separate obligations.
Examples are verified with TypeScript 5.7.3 and Node.js 22.23.3, using ES2022 CommonJS for isolated complete programs. Checks enable strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, and noEmitOnError. ES2022 and DOM declarations provide console typing; runnable code uses only facilities present in the stated Node environment. Module-host fixtures are labeled separately.
What you will learn
- Model data alternatives and relationships with narrowing, generics, and derived types.
- Validate unknown runtime data without assertion-based trust.
- Align modules, declarations, and emitted artifacts with their actual host.
- Test static contracts and runtime outcomes while reviewing compatibility, performance, and security.
Your learning path
Three levels
Basic
Understand values, narrowing, functions, objects, and checked sequences.
- The checker, emitter, and JavaScript runtime
- Values, inference, and control flow
- Unions, narrowing, and nullability
- Functions, contracts, and callbacks
- Objects, interfaces, and structural types
- Arrays, tuples, and checked indexing
Intermediate
Build generic relationships, module contracts, strict checks, and two-layer tests.
- Generics and key relationships
- Mapped types and utility types
- Conditional and template literal types
- Modules, resolution, and declarations
- Strict flags and error boundaries
- Testing types and runtime behavior
Advanced
Design validated libraries and review type limits, builds, migration, and runtime security boundaries.
- Public library design and versioning
- Runtime validation and domain values
- Type-level limits and soundness tradeoffs
- Build performance and project boundaries
- JavaScript migration and toolchain integration
- Security, async boundaries, and a reporting capstone
Who this is for
- Self-study learners with basic JavaScript familiarity.
- Developers migrating JavaScript or designing typed libraries and service boundaries.
Before you start
- Basic functions, objects, arrays, terminal use, and ordinary JavaScript execution.
- A compatible TypeScript compiler and JavaScript runtime; no third-party runtime package is needed for these programs.