-
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
Add Cypress.dom.* to TS type declarations #5298
Conversation
@kylerob This PR looks good, but it would be helpful to have the rest of the |
@flotwig I just pushed up the rest of the declarations. Some of the functions were tougher to nail down types for, so I'm not 100% confident in all my declarations. Is there a good automated way to test these before we publish them? |
The easiest way to test these definitions is probably to exercise them in actual Typescript. There are already tests for You could rename these |
Hey @kylerob, did you have time to add tests for these changes? If you no longer have time, please close the PR. |
@kylerob Unfortunately we have to close this PR due to inactivity. |
Any plans to continue on this? Seem that PR was almost there :) |
@rovshenn You are welcome to open a new PR to continue the work. We can't maintain stale PRs that have had no commits in 4 months. |
I can get this one done, it just needs some tests. |
fix ts lint
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.
@flotwig the tests for typedefs should go in cli/types/tests
. can you add tests to cli/types/tests/cypress-tests.ts
?
sure, i figured converting the existing tests to TS would be enough coverage though |
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.
I don't think we'll enjoy keeping this up to date, and it's not in our docs but I think it can go in
an alternative would be making Cypress.dom an |
@jennifer-shehane could you please tag which release this will be in? Thank you very much for all your assistance! |
This will go out in |
Thank you very much @jennifer-shehane , I am looking forward to that! |
Closes #4408
User facing changelog
Cypress.dom.isDetached no longer throws a type error in TypeScript projects.
Additional details
We may want to include all Cypress.dom.* functions in the index.d.ts. If so, I can add the rest of them in this PR.
PR Tasks
type definitions
?