enum to string js code example
Example: typescript enum to string
enum AnEnum {
One = 1,
Two = 2
}
let stringOne = AnEnum[1]; // "One"
let stringTwo = AnEnum[AnEnum.Two]; // "Two"
enum AnEnum {
One = 1,
Two = 2
}
let stringOne = AnEnum[1]; // "One"
let stringTwo = AnEnum[AnEnum.Two]; // "Two"