4 ms·
Just my personal preference but using these string union types means that you don’t have to import the enum. Plus it’s less verbose and translates back to JS be
by untog 7y ago
Just my personal preference but using these string union types means that you don’t have to import the enum. Plus it’s less verbose and translates back to JS better than an enum does.
Really just a matter of preference though.