Oh. My. God!
I just discovered
//@ts-check in Visual Studio Code.
Now, any issues in you variables (like using variables you haven’t declared) will show as an error in the IDE.
This is what I call super charging your IDE and your development.