There’s another way you can do this. If you don’t want to export your enum you can define it as a const enum
const enum MyEnum {
One = "one";
Two = "two";
}
These are inlined by the compiler and are completely removed during compilation.
There’s another way you can do this. If you don’t want to export your enum you can define it as a const enum
const enum MyEnum {
One = "one";
Two = "two";
}
These are inlined by the compiler and are completely removed during compilation.