I recieve a number type = 3 and have to check if it exists in this enum:
type = 3
export const MESSAGE_TYPE = { INFO: 1, SUCCESS: 2, WARNING:
enum ServicePlatform { UPLAY = "uplay", PSN = "psn", XBL = "xbl" }
becomes:
{ UPLAY: 'uplay', PSN: 'psn', XBL: 'xbl' }
so
ServicePlatform.UPLAY in ServicePlatform // false
SOLUTION:
ServicePlatform.UPLAY.toUpperCase() in ServicePlatform // true