Incompatibilities in the packaged index.d.ts
JoshuaKGoldberg opened this issue · 1 comments
JoshuaKGoldberg commented
Following #1, once the types do get picked up, there are a few difficulties with them:
import { interceptFormData } from 'cypress-intercept-formdata'
is not allowed in TypeScript land because theindex.d.ts
doesn't declare it. Is that intentional?- The
import { Interception } from 'cypress/types/net-stubbing'
, as animport
statement, turns TypeScript's understanding of the file into a module, so it doesn't augment the global scope for theCypress
namespace.- In other words:
cy.wait('@api')
will no longer have.interceptFormData
available - Other libraries such as
cypress-wait-until
useany
instead of theInterception
and don't have this issue. Another way that would still allowimport
s andexport
s would be todeclare global { ... }
around the namespace declaration.
- In other words:
JoshuaKGoldberg commented
Thanks for the quick responses on these issues & PRs! 💖