JavaSript General Signature mismatch Inspector showing weird error
On one of my projects I get the following text from the "JavaScript>General>Signature mismatch" Inspector:
"Argument type [Promise<MyClass>, Promise<MyOtherClass>] is not assignable to parameter type [(PromiseLike<MyClass> | MyClass), (PromiseLike<MyOtherClass> | MyOtherClass), (PromiseLike<any> | any), (PromiseLike<any> | any), ...this repeats several times...]"
The warning is shown on the Promise.all method. I call it like this:
Promise.all([ someFunction(), someOtherFunction()])...
someFunction returns a Promise that will resolve to an instance of MyClass.
someOtherFunction returns a Promise that will resolve to an instance of MyOtherClass.
I just don't see the error. Is that just me, or is there an error with the inspector?
Thank you very much for any help.
Please sign in to leave a comment.
Please provide a full, self-containing code snippet, including yoiur `somefunction` and `otherfunction` definitions
It get's weirder: The inspector does not show the error anymore. Seem's like a restart of PHPStorm solved it.

If I wouldn't have the appended screenshot, I wouldn't believe myself this ever happened.
Thank you very much for trying to help me.
>The inspector does not show the error anymore. Seem's like a restart of PHPStorm solved it.
Must be related to broken indexes; should the problem occur again, please try invalidating caches (File | Invalidate caches, Invalidate and restart)
Iv got almost the same problem with Promise.race:
Invalidation and restart didn't help in my case.
Please provide a full, self-containing code snippet that can be used to recreate the issue. Also, what IDE version do you use?
> Also, what IDE version do you use?
WebStorm 2018.3.1 EAP
Build #WS-183.4588.29, built on November 29, 2018
> Please provide a full, self-containing code snippet that can be used to recreate the issue.
I have no idea why but in the same way as Matthias the error is not reported anymore.
>Must be related to broken indexes; should the problem occur again, please try invalidating caches (File | Invalidate caches, Invalidate and restart)
This seems to be the isse. I now restart the IDE much more frequently and have not seen weird errors like these since.
What PHPStorm especially doesn't seem to like is windows' "Sleep".
After a wake up of the system PHPStorm seems to always be very confused about itself and the opened projects.
Restarting IDE worked for me.