Error on references to literal enum members in conditions - #58264
Conversation
|
TypeScript Bot (@typescript-bot) test it |
|
Hey Wesley Wigham (@weswigham), the results of running the DT tests are ready. Everything looks the same! |
|
Wesley Wigham (@weswigham) Here are the results of running the user tests comparing Everything looks good! |
|
Wesley Wigham (@weswigham) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Wesley Wigham (@weswigham) Here are the results of running the top 400 repos comparing Everything looks good! |
|
Is this a common mistake? I don't think I've ever done this. I think I'd rather this be a more general check of "you're testing the value of a (pseudo-)constant, did you mean to do that?" which feels way more useful than trying to detect that I wrote |
I think we basically already have that in some cases but not all, e.g. function foo() { }
if (foo) {
}where your program has no plausible way of varying on |
|
TypeScript Bot (@typescript-bot) pack this |
|
Hey Gabriela Araujo Britto (@gabritto), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running |
|
TypeScript Bot (@typescript-bot) pack this |
|
Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
So when you write
we inform you in advance that you've failed to actually write
kind ===.