Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions source/guides/tooling/typescript-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ The `"types"` will tell the TypeScript compiler to only include type definitions
You can find an example of Jest and Cypress installed in the same project using a separate `tsconfig.json` file in the {% url cypress-io/cypress-and-jest-typescript-example https://github.com/cypress-io/cypress-and-jest-typescript-example %} repo.
{% endnote %}

{% note warning %}
You may have to restart your IDE's TypeScript server if the setup above does not appear to work. For example:

VS Code (within a .ts file):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to mention that restart TS server can help with intellisense while in a .ts or .js file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bahmutov Thanks for the review, I'll add js as well.

* Open the command palette (Mac: `cmd+shift+p`, Windows: `ctrl+shift+p`)
* Type "restart ts" and select the "TypeScript: Restart TS server." option

If that does not work, try restarting the IDE.
{% endnote %}

## Types for custom commands

When adding {% url "custom commands" custom-commands %} to the `cy` object, you can manually add their types to avoid TypeScript errors.
Expand Down