Re:Lost in Translation: The Bug That Spoke Russian and Crash...
by ficklepickle on Wednesday May 08, 2024 @11:18PM
(#40304994)
TypeScript is nice here because you can specify the specific strings you accept in a union. Eg. `unit: 'AC'|'DC'`
Why people insist on keep using strings instead of typesafe variants is beyond me