This is perfectly normal if you do not need private variables. Dynamic languages โโare hard to parse, and your IDE just doesn't get it.
An alternative, especially if you need a private class field, is:
window.Foo = new (function(){ var some_private; this.alpha = function(){}, this.bravo = function(arg){
Regarding the iteration, I suspect you are using something like:
for(var key in window.Foo) { print(typeof key); }
Try:
for(var key in window.Foo) { print(typeof window.Foo[key]); }
source share