3 ms·
> There’s only one way to use union types, while with enums you can use ButtonStatus.HIDDEN or directly 'HIDDEN' without the compiler complaining. Um.... I jus
by dirtnugget 6y ago
> There’s only one way to use union types, while with enums you can use ButtonStatus.HIDDEN or directly 'HIDDEN' without the compiler complaining.
Um.... I just checked, using a string to compare to an enum type make typescript complain, even if it has the same value.