Union types to solve magic strings problems
With the union types of typescript you are solving the problems of magic strings ? Or it's better to make an object?
3 Replies
You can have fixed values for certain attribute with union type
Or just have different attributes based on fixed value (identifier)
I found union types usually less annoying and less "boilerplate-like"
yep but what option in my question es better?
i think the same but maybe i'm missing something else