-
Notifications
You must be signed in to change notification settings - Fork 3.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(npm/vue): update types #23890
fix(npm/vue): update types #23890
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
Works as described 💯 . Definitely painful to have to maintain types this way, but I suppose that's not work-aroundable based on how complex Vue's component defns are
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.
This fixes the type error for me
User facing changelog
Update type definition for
mount
function exported fromcypress/vue
.Additional details
Steps to test
I could not reproduce this type error in the main Cypress repo. It might be possible via system test, but this seems really overkill. I tested by following the reproduction in the issue.
Prep
Reproduction
Now grab the user's reproduction:
npm run check
- observe errorVerify Fix
rm -rf node_modules/cypress/vue
cp -r ~/path/to/your/monorepo/cli/vue ~/path/to/reproduction/node_modules/cypress/vue
npm run check
again - no errorI'd really like to figure out how better to test these types, but I don't know a good solution right now. Vue types are very painful, there's way too many ways to define a component.
How has the user experience changed?
Better and more correct type inference.
PR Tasks
cypress-documentation
?type definitions
?