Comment Comment by amitport I may be wrong, but I don't think this is what people mean by 'sum types'.I was expecting union types (e.g., https://www.typescriptlang.org/docs/handbook/unions-and-inte... or https://dotty.epfl.ch/docs/reference/new-types/union-types.h... )I guess enums are a type of sum type, but seems this is more specifically about enums parent amitport 6 years ago
I was expecting union types (e.g., https://www.typescriptlang.org/docs/handbook/unions-and-inte... or https://dotty.epfl.ch/docs/reference/new-types/union-types.h... )
I guess enums are a type of sum type, but seems this is more specifically about enums