WebStorm showing warning "Invalid number of arguments, expected 2" when calling Vuex mutation?

I have a call to a Vuex mutation like so:

slideToFrame(framePosition) {
this.setCurrentFrameId(this.currentViewData.scanFramesList[framePosition - 1]);

The mutator looks like this:

setCurrentFrameId(state, frameId) {
state.currentFrameId = frameId;

WebStorm shows the "Invalid number of arguments, expected 2", but all mutators require `state` as their first parameter and I don't believe this is usually passed explicitly. Am I wrong on this or is there a way that WebStorm can not detect these false positives? It seems like this would be built into the Vue support provided by WebStorm.


Please sign in to leave a comment.