Closed bvandercar-vt closed 1 month ago
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.
Current behavior
If not including
"dom"
in"lib"
intsconfig
, i.e."lib": ["ESNext", "DOM"]
, a ts error occurs in the following, but shouldn't:cy.wrap
In other words, the problem is that it assumes the incorrect overload from the Cypress types file. It should assume this use:
but it's assuming this use:
If
"dom"
is added to"lib"
, no error, the correct use is inferred.cy.then
.then
, it goes away, even though the return type from.request
should be the same..should
instead of.then
, it goes away.Desired behavior
Infer the correct types without having to add
"dom"
to tsconfiglib
Test code to reproduce
In description above.
Cypress Version
13.5.0
Node version
18.15.0
Operating System
Windows 11
Debug Logs
No response
Other
No response