In TypeScript enums can be mixed with numeric values and string values.
enum Align { LEFT = 'left', CENTER = 0, RIGHT = 'right' } for (let key in Align) { console.log(`key=${key}, value=${Align[key]}`); }
key=0, value=CENTERkey=LEFT, value=leftkey=CENTER, value=0key=RIGHT, value=right
As seen in the output, the numeric enum element still has reversed mapping while string enum does not have that.
TypeScript team does not recommend to mix the enum value types:
Dependencies and Technologies Used: