-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: add more should interface definitions. #8068
Conversation
Thanks for taking the time to open a PR!
|
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.
did a quick look through and didn't see any typos, lgtm i guess. wish there was a less tedious way to do this.
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 is such a nice job, @sainthkh
should
to increase type safety #5573User facing changelog
Add more
should
interface definitions.Additional details
To remove duplication in comments, I used union types. Without it, many functions have almost identical 4 different documentation comments.
How has the user experience changed?
Now, auto completions like
'have.lengthOf'
work.Note: Why not removing fallback?
It's because there are too many valid combination for chai.js. It's simply impossible to cover all of them. And we can block valid assertions in TS codes.
It's not hard to find them. All we need to do is running the test once.
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?