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

Combine Cy and EventEmitter type before declaring global variables #15022

Closed
bahmutov opened this issue Feb 10, 2021 · 1 comment
Closed

Combine Cy and EventEmitter type before declaring global variables #15022

bahmutov opened this issue Feb 10, 2021 · 1 comment
Labels
stale no activity on this issue for a long period topic: typescript type: typings Issue related to Cypress types (for TypeScript)

Comments

@bahmutov
Copy link
Contributor

Cypress v6.4.0

This is related to the issue #14991 where our types are less than optimal

I have described how to get rid of the global Cypress objects like cy, Cypress, assertion methods, and Mocha's functions in the blog post https://glebbahmutov.com/blog/local-cypress/ While looking at the types I have noticed a few weird things:

Screen Shot 2021-02-09 at 9 22 17 AM

We can merge the type in our code and have the cy be just of type cy, same for the top-level Cypress type

Unfortunately, a simple solution like interface cy extends Chainable<undefined>, EventEmitter {} is blocked by an open MS issue microsoft/TypeScript#16936

@jennifer-shehane jennifer-shehane added the type: typings Issue related to Cypress types (for TypeScript) label May 5, 2021
@cypress-app-bot
Copy link
Collaborator

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.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 17, 2023
@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period topic: typescript type: typings Issue related to Cypress types (for TypeScript)
Projects
None yet
Development

No branches or pull requests

3 participants