Skip to content
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

Merged
merged 7 commits into from
Jul 28, 2020

Conversation

sainthkh
Copy link
Contributor

@sainthkh sainthkh commented Jul 23, 2020

User facing changelog

Add more should interface definitions.

Additional details

  • Why was this change necessary? Help users with more auto completion.
  • What is affected by this change? N/A
  • Any implementation details to explain?

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

  • Have tests been added/updated?
  • Has the original issue been tagged with a release in ZenHub?
  • [N/A] Has a PR for user-facing changes been opened in cypress-documentation?
  • [N/A] Have API changes been updated in the type definitions?
  • [N/A] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 23, 2020

Thanks for taking the time to open a PR!

@sainthkh sainthkh self-assigned this Jul 23, 2020
@sainthkh sainthkh changed the title Types: remove should interface fallback fix: remove should interface fallback Jul 23, 2020
@sainthkh sainthkh changed the title fix: remove should interface fallback fix: add more should interface definitions. Jul 27, 2020
@sainthkh sainthkh marked this pull request as ready for review July 27, 2020 08:52
Copy link
Contributor

@flotwig flotwig left a 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.

Copy link
Contributor

@bahmutov bahmutov left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: TypeScript: remove fallback for should to increase type safety
3 participants