ScreepsAutocomplete
ScreepsAutocomplete copied to clipboard
creep.moveTo function
For some reason, everything seems to work except when I use the creep.moveTo(); function "moveTo" gets underlined as an "unresolved function or method". Any idea why?
Hey mate. You closed this issue about four hours after opening. Did you find a fix? Was it not an issue?
I closed it because it seemed to fix itself, However, I do seem to get this kind of issue with other things too, it seems to happen with some self-defined functions and modules? I'm not entirely sure. It also seems to underline "_". At this point, I'm kind of just at a loss for what causes it.
(This is using Webstorm by the way. It's set up as an external library.)
Hm... if you're able to re-produce this at some point, can you paste your code here, or as a gist? Maybe I can see what's going on then
I've got the same issue with moveTo not being recognized anywhere in PhpStorm
for example:
https://gist.github.com/Amadox/25addf96c2002f984d636baa3b5a05ea
underlining happens both in line 15 and 27.
Hey, can you take a look at this issue and tell me if it fixes your problem?
I have the same problem and the workarounds did not really work... but I try to find out more later
ok .. I have used jsdoc to create a documentation for dash (https://kapeli.com/dash) .. and it also misses the moveTo
function.
It worked after I deleted the * @alias moveTo(target, [opts])
row from the documentation of the function
I have created a branch with a fix, but I need to test it more in the afternoon. It is working for me with the jsdoc generator and it looks like it is working in webstorm.
https://github.com/bastianh/ScreepsAutocomplete/commit/7fd04f23e692fc84f6ff05c5b0c070b3cb1bf313
@bastianh Took a look at your changes and tried them out... seems to work as long as the @param
annotation is in the format /** @param {Creep} creep **/
in Webstorm 2017.1
One contributing factor seems to be in the fact that Webstorm operates in an ambiguous fashion when asserting the attribute against the jsdocs. Trying other combinations such as /** @param {Creep} Creep **/
seems to make moveTo()
work but then breaks others (i.e. harvest()
).
I can't really help with this anymore... I switched to using typescript in december ,)