Hacker News new | ask | show | jobs
by CharlieDigital 707 days ago
This is also another problem and a reason to strictly stick to string type unions, IMO.

There may be a really good use case for the enum type, but I think in most cases, string type unions are clearer, easier, and less prone to errors.