In TypeScript, I want to compare two variables containing enum values. Here\'s my minimal code example:
enum E { A, B } let e1: E = E.A let e2: E = E.B if (
Well I think I found something that works:
if (e1.valueOf() === e2.valueOf()) { console.log("equal") }
But I'm a bit surprised that this isn't mentioned anywhere in the documentation.