When I'm debugging, I've noticed that the silly mistakes I make are often the hardest to spot. For example:
if (id = userId) {..}
And in class methods:
let result = myClass.doThis;
Oddly enough, VSCode doesn't catch these errors during compilation. Is there a tool or setting that can alert me to these issues? Finding them manually can be time-consuming and frustrating, as they're not always easy to spot at first glance.
While these statements are valid in TypeScript, other programming languages often highlight assignments within conditionals and method calls as properties to prevent potential errors. It would be helpful to have a similar warning system in place for TypeScript as well.