|
|
|
|
|
by homebrewer
479 days ago
|
|
const enums are almost never mentioned by these articles for some reason. They give you the best of both worlds: they're fully erasable, and have good LSP support (do no need to search for strings and bump into false matches — or even worse, for numbers). |
|
But const enum seems to have several pitfalls. https://www.typescriptlang.org/docs/handbook/enums.html