Closed dckc closed 8 years ago
In types.rst, I see:
Referring to unknown identifier will assume that the identifier refers to a native JavaScript global.
?!
Is that really on purpose? introduction.rst says implicit globals are dangerous, no?
JavaScript has the var keyword to create local variables but unqualified assignments write to the global object:
How about an analog to the /* global */ directive from JSLint?
/* global */
JSLint also recognizes a /global/ directive that can indicate to JSLint that variables used in this file were defined in other files."
Seconding this. This in conjunction with #17 would make JS globals much nicer.
My interest in this issue is overtaken by the emergence of purescript.
In types.rst, I see:
?!
Is that really on purpose? introduction.rst says implicit globals are dangerous, no?
How about an analog to the
/* global */
directive from JSLint?