Webstorm auto importing symbols?
Hi,
I have noticed that simply adding a javascript script to a project directory seems to be enough for webstorm to consider the script 'added to the project'. Other scripts can then see symbols in the script without even having to import them. At runtime though, you do get 'symbol not found'.
Is this normal or have I got some setting turned off or on that shouldn't be. It's not that big of a deal, but it does mean that just because a file parses successfully in Webstorm doesn't mean it will also be OK at runtime.
Also, doesn't it pollute global namespaces unnecessarily?
Bye,
Mark
Please sign in to leave a comment.
>Is this normal or have I got some setting turned off or on that shouldn't be
no, it's not normal. the IDE usually flags non-imported modules as not resolved, suggesting to import them. The issue may occur if the IDE considers the certain symbol as being declared globally - in such cases, it won't prompt you to import it