S
S
Sergi0Limit2015-09-11 12:36:06
JavaScript
Sergi0Limit, 2015-09-11 12:36:06

Auto-complete for modules not working?

Good afternoon.
There is phpstorm 9.
There is a main.js file
someModule.f();
There is a script.js file

var someModule = (function(){
    window._w = {
      f: function(){
         return 1;
     }
    };
    return {
      f: function(){
         return 1;
     }
}
}());

If the current script file is in the editor, then auto-complete works for someModule.
If a file is opened, for example main, then auto-complete for someModule no longer works.
But auto-complete in the main file works for the _w I specified in window.
Is this a bug or a feature?
UPD:
the files are included in the general html (did not write right away)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question