Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

enum to number typescript

enum UserResponse {
  No = 0,
  Yes = 1,
}
console.log(UserResponse.Yes) //logs : 1
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #enum #number #typescript
ADD COMMENT
Topic
Name
5+8 =