A
A
Alexander2015-01-14 08:34:16
phpstorm
Alexander, 2015-01-14 08:34:16

How to train PhpStrorm to recognize objects in javascript from externally connected Yandex.maps API?

I have a .js file in the project that works with the Yandex.maps API.
When creating and working with objects from the included yandex.maps, phpstorm constantly swears that Unresolved variable or type. For example, the map initialization line:
var myMap = new ymaps.Map(...);
Naturally, ymaps is an unknown type for PhpStorm. How to make it famous?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sasha, 2015-01-14
@madmages

As far as I understand, no way. Even for php, you need to explicitly write phpdoc there so that it doesn’t swear and when you ctrl + click on a class object, it opens a file with this class and this is within the framework of one project, and the plug-in map lib is not in your project.
Options:
1. reconcile
2. do not put up.

S
Sergey Novikov, 2015-01-19
@BOOMER_74

Download the js file, put it in a folder, add this folder or a specific file in the settings in the js libraries. But this will solve only part of the problem, he will still not see some variables.
d6d9d1f5c30149adaa3243889afcefeb.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question