3 ms·
Say all you need is a fixed set of strings that get reused everywhere. What is better accomplished by defining a union type AND consts literals rather vs creati
by folkrav 6y ago
Say all you need is a fixed set of strings that get reused everywhere. What is better accomplished by defining a union type AND consts literals rather vs creating a single string-based enum and using that everywhere? I feel like I'm misunderstanding...
- mssundaram 6y agoYou don't even need the const literals. type Color = "red" | "blue" | "green";