3 ms·
Typescript has actual enums. They behave just like Go's (for better or worse). It's not clear why Rust got confused.
by randomdata 3y ago
Typescript has actual enums. They behave just like Go's (for better or worse).
It's not clear why Rust got confused.
- adamrezich 3y agoyep, sorry about that, I misremembered TypeScript as having the same "kind of enums" as Rust.
- tubthumper8 3y agoTypeScript has discriminated unions if that's what you were thinking of https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...