sorry I am newbie in Typescript.
I have enum with String value like this
export enum NotificationType {
GeneralInfo = "General Info",
EventUpdate = "Event Update",
}
and I want to get that string value in a method. I have tried it like this
notifictionTypeToString(type: NotificationType) : string {
if (type == NotificationType.EventUpdate) {
return NotificationType[NotificationType.EventUpdate];
}
}
if I read the documentation about enum reverse mapping , I can access the string value like that, but I have an error
so how to get string value in enum ?