If you're using TypeScript, don't forget that you can use both sides of the expression for that extra performance boost:
if (!!!!!!!!!!foo!!!!!!!!!!)
is valid code
Yes, very useful, but also often an indicator that someone is just working around the type system and writing unsafe code. It's often better to assert types with "as blah" or use type narrowing or whatever. We've been hit multiple times with people using this and ending up with exceptions in prod!
Thanks for the tip. In that case, it makes me wonder if this should be something that should be optionally flagged as a warning, but I haven't written any code with it, so I don't know if there is code where it is the best option. I.e. discourage features that do more harm than good.