Don't get autocomplete/intellisense when using "this" in store actions #530
-
According to the documentation I should get type support when writing "this" in store actions. Doesn't seem to work for me. What am I doing wrong. Thankful for any advice! It's described here
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
You might be missing a config file for TS to work because it does autocomplete on my end. Maybe |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Damn. Restarted my editor and suddenly it works. Not sure how or why it didn't work at first. But now it does ✨ |
Beta Was this translation helpful? Give feedback.
-
I just ran into this issue, too. Due to the huge codebase (updating from v0.0.5 to latest v1), I did not immediately see the type error in the beginning of the log. Turns out we are on a too old @vue/composition-api version also. Pinia requires at least v0.6.0, but we are on v0.4.0. Would be cool if pinia could specify this dependency as a Anyway, seems I have to update the composition-api... the biggest problem is all the watchers, that are then lazy by default... who will test all the flows? :/ |
Beta Was this translation helpful? Give feedback.
-
I have also a weird issue in my Typescript project. Intellisense works inside actions, but inside getters it can't see any of actions. |
Beta Was this translation helpful? Give feedback.
-
In case it helps anyone else, I had the same problem and fixed it by switching |
Beta Was this translation helpful? Give feedback.
Damn. Restarted my editor and suddenly it works. Not sure how or why it didn't work at first. But now it does ✨