-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
fix(nuxt): usePinia composable type #2890
Conversation
✅ Deploy Preview for pinia-playground ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for pinia-official ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@posva would be lovely if this could be merged as I currently have to always use const pinia = usePinia() as Pinia // `as Pinia` is required here because it's Unknown
const profileStore = useProfileStore(pinia) |
Does this happen in a blank project? It's the first time I see this issue |
Seems like it does, the type of the composable does not get into the build and defaults to |
It's so weird, this used to work so maybe a regression in Nuxt. I will merge but |
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3 #2890 +/- ##
=======================================
Coverage 91.23% 91.23%
=======================================
Files 17 17
Lines 1381 1381
Branches 211 211
=======================================
Hits 1260 1260
Misses 120 120
Partials 1 1 ☔ View full report in Codecov by Sentry. |
This PR fixes a type issue in the nuxt module. using the composable
usePinia
would always returnunknown
while it should always return thePinia
type.Before: composable.d.ts
After: composable.d.ts