enum as number typescript code example
Example: enum to number typescript
enum UserResponse {
No = 0,
Yes = 1,
}
console.log(UserResponse.Yes) //logs : 1
enum UserResponse {
No = 0,
Yes = 1,
}
console.log(UserResponse.Yes) //logs : 1