3 ms·
Typescript has a fairly official way to do sum types (less poncily known as tagged unions): https://www.typescriptlang.org/docs/handbook/unions-and-intersectio
by IshKebab 5y ago
Typescript has a fairly official way to do sum types (less poncily known as tagged unions):
https://www.typescriptlang.org/docs/handbook/unions-and-intersections.html https://www.typescriptlang.org/docs/handbook/unions-and-inte...
Might make the example a bit clearer.