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] Cypress.session type does not exist #19363

Closed
IanVS opened this issue Dec 14, 2021 · 6 comments · Fixed by #19412
Closed

[typescript] Cypress.session type does not exist #19363

IanVS opened this issue Dec 14, 2021 · 6 comments · Fixed by #19412
Labels

Comments

@IanVS
Copy link
Contributor

IanVS commented Dec 14, 2021

Current behavior

I tried to use Cypress.session.clearAllSavedSessions();, but got a typescript error.

image

Desired behavior

Cypress.session should be typed correctly.

Test code to reproduce

https://github.com/IanVS/cypress-test-tiny

npm i
npm run typecheck

Cypress Version

9.1.1

Other

No response

@emilyrohrbough
Copy link
Member

@IanVS Would you be interested in contributing the types for this syntax?

@IanVS
Copy link
Contributor Author

IanVS commented Dec 17, 2021

Honestly I'm not sure why they're not already there, since the file is written in typescript...

async clearAllSavedSessions () {

To me, that points to a larger problem in the way that typescript is being run and published within the repo. Maybe it's better for someone with more familiarity to take a quick look at it?

@emilyrohrbough
Copy link
Member

@IanVS I think the issue is session is missing from the Cypress interface here.

@IanVS
Copy link
Contributor Author

IanVS commented Dec 17, 2021

👍 thanks, then yeah I can take a crack at adding it.

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: needs review The PR code is done & tested, needs review stage: work in progress labels Dec 17, 2021
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Dec 20, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 20, 2021

The code for this is done in cypress-io/cypress#19412, 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 Dec 21, 2021

Released in 9.2.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants