Closed easyfrog closed 7 years ago
src/game.js var Game = function() {...};
var Game = function() {...};
.tern-project { "loadEagerly": [ "src/*.js" ] }
{ "loadEagerly": [ "src/*.js" ] }
main.js var g = new Game(); g. there is no completion suggestion.
var g = new Game();
g.
I must change the game.js from var Game = to window.Game = . then could get suggestion correct.
var Game =
window.Game =
So is the variables must in global scope ?
OH.... when I remove "node" plugins then it works. so the var Game = is conflict to the node plugin?
The node plugin isolates files into CommonJS modules, so they don't share a top scope.
src/game.js
var Game = function() {...};
.tern-project
{ "loadEagerly": [ "src/*.js" ] }
main.js
var g = new Game();
g.
there is no completion suggestion.I must change the game.js from
var Game =
towindow.Game =
. then could get suggestion correct.So is the variables must in global scope ?