November 3, 2016TypeScript 2.0 implements a rather useful feature: tagged union types, which you might know as sum types or discriminated union types from other programming languages. A tagged union type is a union type whose member types all define a discriminant property of a literal type. Because the above definition is rather theoretical, we're going to be looking at two examples that illustra