-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler option to force explicit access for global properties #524
Comments
This is already reasonably possible -- just delete all the globals you don't like from |
Ok, but if I delete such globals how will I see them when I do want to access them via "window.length" ? Won't that remove them completely ? |
No. |
Got it. Indeed that solves it then, thanks! |
I've hurt myself multiple times with code like this:
the problem is that I forgot to declare the "length" variable but because one exists as "window.length" this compiles without a problem.
A good help would be a stricter compiler option which would only allow accessing global properties like this:
The text was updated successfully, but these errors were encountered: