Closed agustingutierrezcompass closed 7 hours ago
Hi @agustingutierrezcompass , it looks like the type declaration for the hasPseudoElement
command does not quite match the implementation.
The type declaration only defines one parameter, pseudo: string
. However, your implementation is trying to create a command that receives the previous subject. You'll need to make sure your command declaration signature (in index.ts
) matches the command implementation signature (in commands.ts
), by adding a subject
parameter to the type declaration in index.ts
. If this still doesn't work for you, feel free to re-open with a reproduction forked from https://github.com/cypress-io/cypress-test-tiny. Thanks!
https://github.com/cypress-io/cypress-test-tiny/pull/96/files here is an example @cacieprins
Current behavior
Hey Team I have this command: index.ts
commands.ts
And I have this ts error
No overload matches this call.
The last overload gave the following error. Type 'true' is not assignable to type '(boolean | keyof PrevSubjectMap | (keyof PrevSubjectMap)[]) & (keyof PrevSubjectMap)[]'
Desired behavior
No response
Test code to reproduce
Hey Team I have this command: index.ts
commands.ts
And I have this ts error
No overload matches this call.
The last overload gave the following error. Type 'true' is not assignable to type '(boolean | keyof PrevSubjectMap | (keyof PrevSubjectMap)[]) & (keyof PrevSubjectMap)[]'
Cypress Version
13.12.0
Node version
18.20.4
Operating System
macOs 14.7.1
Debug Logs
No response
Other
No response