-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@cypress/grep grepTags Typescript issue #28458
Comments
Did you update config.ts file ??
Please follow https://github.com/cypress-io/cypress/tree/develop/npm/grep#install |
Just tried there and still seeing the Typescript error |
Try again, I have updated exact config for typescript, I would recommend to restart TS server |
Tried again and restarted TS server (also tried restarting VSCode), but still seeing the error |
@catkav I've had the same issue until I realized cypress grep was one major version behind. Please upgrade it to the latest version (it should be major version 4) and try again. After the upgrade, just adding |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
Current behavior
When using grepTags in
it
block I'm seeing the following error:Argument of type '{ tags: string; }' is not assignable to parameter of type 'ProvidesCallback'. Object literal may only specify known properties, and 'tags' does not exist in type 'ProvidesCallback'.
I've added "@cypress/grep" to "types" in my tsconfig.json file and I've added
/// <reference types="@cypress/grep" />
to the top of my index.d.ts file like was suggested here cypress-io/cypress-grep#166 (comment)Desired behavior
Currently I've added a comment to ignore the error
//@ts-expect-error TS(2345): Argument of type '{ tags: string; }' is not assignable to parameter of type 'ProvidesCallback'
However I want to tag a lot of tests and I don't want to have to comment them all, so looking for a way to resolve the error
Any help appreciated
Test code to reproduce
@cypress/grep version: 4.0.1
Cypress Version
12.17.2
Node version
v18.16.1
Operating System
macOS 13.6.1
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: