You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using WebStorm IDE, using defineStore() function to define a store using id as the first parameter and options object as second makes WebStorm not see any of the internal properties, getters, or actions in Intellisense when used in vue templates, it only sees the internal store values. In the script section, everything works as intended. Moving id into the options object makes Intellisense behave as expected.
Try to use the store in a template eg. <h1> {{ myStore.myVal }} </h1>
WebStorm will complain that myVal does not exist in the object and Intellisense/autocomplete on myStore only results in showing internal store values (such as $patch)
Expected behavior
WebStorm will see and recognize my defined values of the store alongside the internal ones.
Actual behavior
WebStorm only sees internal store values
Additional information
I verified the problem exists using the latest Pinia version when using the new defineStore syntax. Moving the id back to the options menu as in the old syntax does not suffer from this problem.
See discussion: #531
The text was updated successfully, but these errors were encountered:
vuejs
locked and limited conversation to collaborators
Nov 4, 2021
Reproduction
Using WebStorm IDE, using
defineStore()
function to define a store using id as the first parameter and options object as second makes WebStorm not see any of the internal properties, getters, or actions in Intellisense when used in vue templates, it only sees the internal store values. In the script section, everything works as intended. Moving id into the options object makes Intellisense behave as expected.Steps to reproduce the behavior
<h1> {{ myStore.myVal }} </h1>
Expected behavior
WebStorm will see and recognize my defined values of the store alongside the internal ones.
Actual behavior
WebStorm only sees internal store values
Additional information
I verified the problem exists using the latest Pinia version when using the new defineStore syntax. Moving the id back to the options menu as in the old syntax does not suffer from this problem.
See discussion: #531
The text was updated successfully, but these errors were encountered: