Documentation and types do not reflect behaviour of then
when returning element
#14875
Labels
type: typings
Issue related to Cypress types (for TypeScript)
Current behavior
Given
This doesn't produce a TypeScript type error.
At runtime it throws an exception:
This appears to happen because
el
is not actually aHTMLDivElement
, despite what TypeScript thinks. It's actually aJQuery
wrapped element.Desired behavior
then
.Test code to reproduce
See above
Versions
Latest TS and Cypress
The text was updated successfully, but these errors were encountered: