<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.0.2 **Code** ``` ts enum Direction { LEFT, RIGHT } function bug(direction?: Direction): number { if (!direction) { return 10; } else { return (direction === Direction.LEFT) ? 10 : 0; } } ``` You get a compile error saying the Direction can't be used in ===. This is IMO incorrect.