Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript enum to string

enum AnEnum {
    One = 1,
    Two = 2
}
let stringOne = AnEnum[1]; // "One"
let stringTwo = AnEnum[AnEnum.Two]; // "Two"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #enum #string
ADD COMMENT
Topic
Name
9+8 =