Custom command cannot be found on keyof Chainable<any> when parameter types are imported. #22443
Unanswered
J-Benyon
asked this question in
Questions and Help
Replies: 2 comments
-
I have the same problem. To fix this, you need to move your import statements inside the namespace, that should do it. I follow the docs' provided repo here. https://github.com/cypress-io/cypress-realworld-app/blob/develop/cypress/global.d.ts |
Beta Was this translation helpful? Give feedback.
0 replies
-
same issue after upgrade to 12 this only applies to files with this declaration:
try change to:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If we take a look at this example commands.ts file here
This works perfectly file, and the custom command can be used as normal, however when I import something from a types.ts file, it no longer can find the value, as shown below.
We get the error
Argument of type '"artefact"' is not assignable to parameter of type 'keyof Chainable<any>'
even thoough nothing has changed with the custom command itself.This is my types.ts
What could be causing this?
Beta Was this translation helpful? Give feedback.
All reactions