I'm a big fan of TS, but discriminated unions are available in a lot of languages and when not, there's usually some library adding it like boost::variant if the language has runtime types or templating/macros.
I should have been specific, but all of the errors I mention above are compile-time errors, not run-time.
No, thanks.