I'm having one of those great issues that seemingly cannot be reproduced in a minimal example, but don't seem to go away in the full project.
The problem is as follows:
I'm using `vuex-typescript` in order to work with Vuex in a TypeScript-ish manner. The package provides functions which return typed functions which are then used to access the Vuex store. I have a "vuex action" defined, which takes a single argument as its "payload".
However, when I try to use it in my code, I'm getting an "invalid number of arguments" error marker:
If I didn't know better, this would seem fine, as WebStorm infers that the type is "DispatchAccessorNoPayload", which indeed takes no payload as argument:
However, this is actually not the type of the function - as WebStorm confirms, because when I Ctrl+Click the function, I get transported to the definition, where WebStorm indeed detects the type as "DispatchAccessorWithPayload"!
- Checked I'm not accidentally importing a different function.
- Invalidated Cache & Restarted (several times)
- Deleted `.idea` folder, started anew.
- Tried to produce a minimal example to no avail, as the error simply does not manifest in a bare project - and I can't make it go away by any means in the actual project.
I'm reasonably sure this error only appeared in 2018.3; I used to use WebStorm with `vuex-typescript` for quite a while now. I'm out of troubleshooting ideas. This is quite annoying, as it marks completely valid files as files with errors, so I need to "get used" to seeing red underlines and error markers all over the place - or lose the benefits of arguments and types altogether.
Thanks in advance for any ideas or pointers!