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.

18 lessonsEnglish + ArabicContent reviewed
Start learning

In 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

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.