4 ms·
> Enums IMO have no advantage over union types with string literals, e.g. `type Status = 'fulfilled' | 'pending' | 'failed'`. Well I would say having to not re
by iLoveOncall 5y ago
> Enums IMO have no advantage over union types with string literals, e.g. `type Status = 'fulfilled' | 'pending' | 'failed'`.
Well I would say having to not repeat and update your code everywhere when you change or add a possible value is a pretty big advantage.