Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creep.moveTo function #43

Open
xephael opened this issue Sep 4, 2016 · 10 comments
Open

creep.moveTo function #43

xephael opened this issue Sep 4, 2016 · 10 comments

Comments

@xephael
Copy link

xephael commented Sep 4, 2016

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?

@xephael xephael closed this as completed Sep 4, 2016
@Garethp
Copy link
Owner

Garethp commented Sep 4, 2016

Hey mate. You closed this issue about four hours after opening. Did you find a fix? Was it not an issue?

@xephael
Copy link
Author

xephael commented Sep 5, 2016

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.)

@xephael xephael reopened this Sep 5, 2016
@Garethp
Copy link
Owner

Garethp commented Sep 5, 2016

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

@marartner
Copy link
Contributor

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.

@Garethp
Copy link
Owner

Garethp commented Sep 29, 2016

Hey, can you take a look at this issue and tell me if it fixes your problem?

@bastianh
Copy link

I have the same problem and the workarounds did not really work... but I try to find out more later

@bastianh
Copy link

bastianh commented Nov 29, 2016

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

@bastianh
Copy link

bastianh commented Nov 29, 2016

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

@nholms
Copy link

nholms commented Mar 29, 2017

@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()).

@bastianh
Copy link

I can't really help with this anymore... I switched to using typescript in december ,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants