Skip to content

Commit

Permalink
Add note about potential IDE TS server issues (#2136)
Browse files Browse the repository at this point in the history
* add note about potential IDE TS server issues

* include js in file types that support restart command
  • Loading branch information
kylerob authored and jennifer-shehane committed Oct 7, 2019
1 parent 80aa86c commit b3f22ed
Showing 1 changed file with 10 additions and 0 deletions.
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 or .js file):
* 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

0 comments on commit b3f22ed

Please sign in to comment.