But const enum seems to have several pitfalls. https://www.typescriptlang.org/docs/handbook/enums.html