You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've hurt myself multiple times with code like this:
var x = length / 2;
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:
window.length
The text was updated successfully, but these errors were encountered:
This is already reasonably possible -- just delete all the globals you don't like from lib.d.ts (look around line 9800). Once we have #494 implemented, it will be straightforward to have a lib_noglobals.d.ts file that gives you the desired behavior.
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: