Mastering TypeScript: From Fundamentals to Type-Level Programming & Functional Effect-TS
Master TypeScript from the ground up to advanced type-level metaprogramming and functional architecture powered by Effect-TS. Modeled after the world-class TotalTypeScript curriculum by Matt Pocock.
(COMING SOON) Moving from object-oriented patterns to functional programming, leveraging pure algebraic data types and the immensely powerful Effect-TS ecosystem.
An exhaustive deep dive into TypeScript’s bottom type (never). Learn how set theory models the empty set ($mptyset$), the 3 sources of ’never’ in type analysis, and how to implement compile-time exhaustiveness checking for Discriminated Unions.
An in-depth guide to Function Overloads in TypeScript. Learn how to define multiple overload signatures, why the implementation signature is invisible to callers, how TypeScript matches overloads sequentially, and when to use Union types instead of Overloads.
An exhaustive guide to typing functions in TypeScript. Learn function expressions, type aliases, destructuring parameter signatures, optional/default/rest parameters, call signatures with properties, and why ‘void’ callbacks ignore return values.
An exhaustive guide to Discriminated Unions in TypeScript. Learn why optional property blobs create impossible states, the 3 requirements for tagged unions, how Control Flow Analysis narrows discriminants, and real-world domain state patterns.
Learn how to build custom runtime type validators in TypeScript. Master Type Predicates (parameter is Type), Assertion Functions (asserts val is Type), array .filter() type narrowing, and safely parsing untrusted external JSON data.
Understand how TypeScript’s Control Flow Analysis engine refines types across code branches. Master typeof guards (and the typeof null quirk), instanceof class narrowing, the ‘in’ property operator, equality narrowing, and truthiness pitfalls.
An in-depth breakdown of TypeScript Literal Types. Understand unit types in set theory, how string/number literal unions replace Enums with zero runtime overhead, and how to solve object property literal widening bugs.
An in-depth analysis of Unions and Intersections in TypeScript. Understand how set theory models type relationships ($A \cup B$ vs $A \cap B$), property access rules, property conflict resolution to ’never’, and operator precedence.
Understand the type-system mechanics of top types in TypeScript. Learn why ‘any’ disables type checking and causes type contagion, why ‘unknown’ provides safe dynamic typing, and how to use ‘unknown’ with runtime validation.
An exhaustive guide to typing collections in TypeScript. Learn the syntax differences between T[] and Array, union array typing precedence, labeled tuple elements, rest tuples, and why readonly arrays prevent array mutation bugs.