TypeScript types for cy.then
See original GitHub issueType of feature
- Add a new command
- Extend a default Cypress command
- Change a Cypress-commands command
- Other
What do you want to accomplish?
A clear and concise description of what the problem is. Ex. I’m always frustrated when […] I am using Cypress with typescript and would love to use the retry feature of your package
Why?
A short description of why you want to accomplish the things mentioned above. however I am getting errors related to types.
Argument of type '{ retry: boolean; }' is not assignable to parameter of type 'Partial<Timeoutable>'. Object literal may only specify known properties, and 'retry' does not exist in type 'Partial<Timeoutable>'.ts(2345)
Describe possible implementations
A clear and concise description of what you want to happen. I am not quite sure how, but I think we need to overwrite the default cypress then typings to include this packages options.
Additional context
Add any other context or screenshots about the request here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Awesome! I’ll go ahead and merge it then.
I’ll include it in the 0.1.0 release which will also include #4 which I plan to finish up somewhere tonight or tomorrow.
That looks like it did the trick! Thank you so much!
I tried both
cy.then({ retry: true }, () => ++c)
cy.then(() => ++c, { retry: true })
Both passed and gave me the expected warnings when I passed incorrect options.