-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
What would you like?
The ability for extension authors to extend the types used in the defineConfig function when configuring Cypress via cypress.config.ts (or, to a lesser extent, cypress.config.js).
Why is this needed?
I am the author of cypress-commands which adds a few new commands and extends some others.
One of the extended commands also adds a new property to the config file. In this case, the extended cy.request() uses the requestBaseUrl config property. Details on the command: https://github.com/Lakitna/cypress-commands/blob/develop/docs/request.md
I have tried to extend it using the same approach as with adding commands to the types. It does not work as-is, the type validation keeps throwing errors.
Other
To make things seamless for users, I want to refrain from using/recommending workarounds like:
- Directly export the config without using
defineConfig. This skips the type checks. - Use
cypress.config.jsinstead of.ts. This skips the type checks.