You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prevSubject: true Type 'true' is not assignable to type '(boolean | keyof PrevSubjectMap<unknown> | (keyof PrevSubjectMap<unknown>)[]) & (keyof PrevSubjectMap<unknown>)[]'
#30672
The last overload gave the following error.
Type 'true' is not assignable to type '(boolean | keyof PrevSubjectMap | (keyof PrevSubjectMap)[]) & (keyof PrevSubjectMap)[]'
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
The text was updated successfully, but these errors were encountered:
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!
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
The text was updated successfully, but these errors were encountered: