Data from Vuex mapState helper string array shows error "Element is not exported"

When using the Vuex mapState helper as described in the Vuex docs, Webstorm does not recognize the computed properties. 


<pure-task-list :tasks="tasks" />

import PureTaskList from "./PureTaskList";
import { mapState } from "vuex";

export default {
name: "task-list",
components: {
computed: {

In this line:

<pure-task-list :tasks="tasks" />

"tasks" is underlined and shows "Element is not exported" on hover. 

Supplying an arrow function also fails:

...mapState({ tasks: state => state.tasks })


The only way I can get Webstorm to recognize the store data is to explicitly define the computed property:

tasks() {
return this.$store.state.tasks

Is there any way to avoid this redundancy?

Comment actions Permalink

Please vote for to be notified on any progress with it

Comment actions Permalink

Ah, even searched open issues and missed that somehow. Thanks!


Please sign in to leave a comment.