Getters in Setup Stores have Type any
when using Vue 2.7
#2881
Unanswered
tkallage
asked this question in
Help and Questions
Replies: 1 comment
-
@posva Why is this issue converted to a discussion without any further explanation? Do you need more information to understand what I mean or to reproduce the bug? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reproduction
https://stackblitz.com/edit/vitejs-vite-6msorpnr?file=src%2Fmain.ts&view=editor
Steps to reproduce the bug
Computed properties on a pinia store instance, that was define with the setup syntax, has the type
any
, when using the following package versions:vue: 2.7.16
pinia: >= 2.2.3 (works on pinia 2.2.2 and below)
Expected behavior
I expect the property of the store to have the unwrapped type of the computed property that was declared in the store definition.
The bug is not existent in pinia version 2.2.2: https://stackblitz.com/edit/vitejs-vite-qujzmp33?file=src%2Fmain.ts&view=editor
Actual behavior
The type is
any
.Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions