Answer the question
In order to leave comments, you need to log in
How to correctly describe a variable in Javascript in PhpStorm?
It used to be all the same, but now I decided to get confused. Let's say we use Yandex.maps, insert a call to the maps script
<script src="//api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script>
, then next we write our script:<script type="text/javascript">
$(function () {
ymaps.ready(function () {
// ......
});
});
/* @var Array $ymaps */
, for example, but what about in Javascript?
Answer the question
In order to leave comments, you need to log in
Basically the same idea. You can create a reference.js file nearby (not included in the assembly) or something like that, and place this variable there. Or, in the project settings, add this variable as a global one.
There is no sensible solution, when loading from api-maps.yandex.ru , you load everything just a module loader, which, if used, will be pulled up. Humble yourself.
How to load lib directly from IDE
Similar question on toaster
Maps API library chunks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question