I have this enum:
export enum myEnum {
name1 = 'my name',
name2 = 'my other name',
name3 = 'other'
}
and i have a myEnum object:
const x = myEnum.name1;
console.log(x) // prints 'my name'
How can i print 'name1' with my const x? In other words, how to get the enum name 'name1' with a myEnum value 'myEnum.name1'?
EDIT:
This is how it looks: