-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Introduce CypressCommandLine namespace to type NPM module api #8096
Conversation
Thanks for taking the time to open a PR!
|
@sainthkh does this make the types exported from the NPM package, or does it only create an ambient global namespace |
cli/types/cypress-npm-api.d.ts
Outdated
@@ -6,7 +6,7 @@ | |||
// in the future the NPM module itself will be in TypeScript | |||
// but for now describe it as an ambient module | |||
|
|||
declare module 'cypress' { | |||
declare namespace CypressCmd { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be better named CypressCommandLine
@flotwig We cannot export interfaces in the module because there is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, tests are passing, thanks for updating the name
Should this be documented somewhere in our TypeScript docs? @sainthkh |
How about adding cypress.run({ env })
.then((result: CypressCommandLine.CypressRunResult) => {
logger.info(result.totalTests);
logger.info(result.totalFailed);
}); |
User facing changelog
Moved types inside
'cypress'
module toCypressCmd
namespace to make them usable.Additional details
cypress-npm-api.d.ts
weren't usable for users who want to create their own TypeScript commands.How has the user experience changed?
N/A
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?