One case of an ADT: a tagged record with the case's fields spread flat.
type Shape = Variant<'Circle', { radius: number }> | Variant<'Rect', { w: number; h: number }>; Copy
type Shape = Variant<'Circle', { radius: number }> | Variant<'Rect', { w: number; h: number }>;
One case of an ADT: a tagged record with the case's fields spread flat.