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

TypeScript: Property 'removeListener' does not exist on type 'cy' #5228

Closed
rdhelms opened this issue Sep 27, 2019 · 2 comments · Fixed by #6066
Closed

TypeScript: Property 'removeListener' does not exist on type 'cy' #5228

rdhelms opened this issue Sep 27, 2019 · 2 comments · Fixed by #6066

Comments

@rdhelms
Copy link

rdhelms commented Sep 27, 2019

Current behavior:

image

Desired behavior:

cy.removeListener and cy.removeAllListeners should be typed, since they are usable as referenced here:
https://docs.cypress.io/api/events/catalog-of-events.html#Binding-to-Events

Steps to reproduce:

  1. Create any cypress project using TypeScript as documented here:
    https://docs.cypress.io/guides/tooling/typescript-support.html
  2. In an it() block in a *.ts spec file, type cy.removeListener()
  3. TS will show an error

Versions

cypress@3.4.1

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels Dec 31, 2019
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Jan 7, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jan 7, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 7, 2020

The code for this is done in cypress-io/cypress#6066, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 10, 2020

Released in 3.8.2.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v3.8.2, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants