Practical introduction to algebraic datatypes (ADTs) in TypeScript
Product types? Sum types? Variants? Unions? …in TypeScript?!
Published in
6 min readAug 10, 2021
Algebraic DataTypes or ADTs are specific kinds of composite types or combinations of types. The major classes of ADTs are Product types and Sum types. The big deal is that they allow you to express powerful ideas at compile time, using your type…