Рет қаралды 189,648
TypeScript enums are not great. In almost all cases, I use an 'as const' with a sprinkling of type magic to express them.
Become a TypeScript Wizard with Matt's TypeScript Course:
www.totaltypescript.com/
Follow Matt on Twitter
/ mattpocockuk