I have two enums which are defined like this:
enum Ed {
up,
down,
left,
right,
}
//or
enum Es {
A = "a",
B = "b",
C = "c",
}
So I need a function isStringEnum which for isStringEnum(Ed) or isStringEnum(Ed.up) will return false. For isStringEnum(Es) or isStringEnum(Es.A) will return true.
Thanks
strings or not like this. Does that meet your needs? (Note that a numeric enum will have somestringproperty values, since they include reverse mappings). If so I could write up an answer; if not, please show the use case where it fails. (You will need to mention me via @jcalz if you want me to be alerted, btw)