-
-
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(types): fix storeToRefs state return type (#2574) #2604
fix(types): fix storeToRefs state return type (#2574) #2604
Conversation
✅ Deploy Preview for pinia-official canceled.
|
✅ Deploy Preview for pinia-playground ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## v2 #2604 +/- ##
==========================================
- Coverage 95.42% 95.35% -0.08%
==========================================
Files 11 11
Lines 2886 2904 +18
Branches 190 190
==========================================
+ Hits 2754 2769 +15
- Misses 131 134 +3
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you add a test for an options store using a special ref within the state()
fn too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I need to test locally with the latest dependencies. Or if you have the time could you rebase against v2
to get the latest deps?
Unfortunately, I won't have access to my laptop for the next 3-4 days and won't be able to rebase against v2 during this time. If it's urgent, feel free to handle it yourself. Otherwise, I can assist once I'm available. Let me know if there's anything else I can do |
It's not urgent, don't worry 🙂 |
Initially, I forgot to handle the case with actions in the store, so I made some updates to the type and added tests for the store that contained the actions. |
…oreToRefs return type (close vuejs#2574)
…in the state function
9c5f7ec
to
50aa53b
Compare
Also, I've rebased my feature branch onto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Unfortunately, this wasn't fixing it; it set the returned type of storeToRefs to |
To be honest it's a bit unexpected. Could you provide cases when the return type is set to |
It was unexpected to me too. See 5c1c3e1 and the failed checks in other commits. |
Interesting that the initial commit was successful, but once you removed the I've tested it locally and looks like this commit broke the pipeline. It seems like adding |
Yeah, looks like adding |
@posva Just tagging you as hope this can still make it to release |
Add new mapped type to keep original ref type in the
storeToRefs
return type (close #2574)