Is this something typescript could fix? I've written a fair few union types with discriminants that work in the same way as rust enums.
The trick though is to declare the redundant fields as undefined for every overlap case.
The trick though is to declare the redundant fields as undefined for every overlap case.