I get from a RESTful Service the following data:
[ { \"id\": 42, \"type\": 0, \"name\": \"Piety was here\", \"description\": \"Bacon is tas
Enums in TypeScript are numbers at runtime, so message.type will be 0, 1, 2 or 3.
message.type
0
1
2
3
To get the string value, you need to pass that number into the enum as an index:
Type[0] // "Info"
So, in your example, you'll need to do this:
Type[message.type] // "Info" when message.type is 0
Docs