We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usePiniaStore.ts
export const usePiniaStore = defineStore("piniaStore", () => { const error = ref<any>(null) return { error, } })
storeToRefs
const { error } = storeToRefs(usePiniaStore())
You will see error has an any type instead of Ref<any>.
any
Ref<any>
I expect error to be Ref<any> instead of just any.
Returns any instead of Ref<any>.
Here is my package.json,
package.json
{ "name": "vue-3", "version": "0.0.0", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", "preview": "vite preview" }, "dependencies": { "pinia": "^2.0.9", "vue": "^3.2.25" }, "devDependencies": { "@types/node": "^17.0.5", "@vitejs/plugin-vue": "^2.0.0", "typescript": "^4.4.4", "vite": "^2.7.2", "vue-tsc": "^0.29.8" } }
The text was updated successfully, but these errors were encountered:
It happens on vue js as well so I have created a new issue there as well: vuejs/core#5188.
Sorry, something went wrong.
No branches or pull requests
Steps to reproduce the behavior
usePiniaStore.ts
,storeToRefs
,You will see error has an
any
type instead ofRef<any>
.Expected behavior
I expect error to be
Ref<any>
instead of justany
.Actual behavior
Returns
any
instead ofRef<any>
.Additional information
Here is my
package.json
,The text was updated successfully, but these errors were encountered: