Skip to content

Commit

Permalink
docs: Add note about allowSyntheticDefaultExports
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbrea committed Aug 10, 2022
1 parent a7fc36f commit 0db25ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cypress-commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,13 @@ describe("users page", () => {

For those writing [TypesScript tests in Cypress][cypress-typescript], this package includes TypeScript declarations.

Add "@mocks-server/cypress-commands" to the `types` property in the `tsconfig.json` file:
Add "@mocks-server/cypress-commands" to the `types` property in the `tsconfig.json` file. You may also need to set the TS `allowSyntheticDefaultImports` option to true:

```json
{
"compilerOptions": {
"types": ["cypress", "@mocks-server/cypress-commands"]
"types": ["cypress", "@mocks-server/cypress-commands"],
"allowSyntheticDefaultImports": true
}
}
```
Expand Down

0 comments on commit 0db25ce

Please sign in to comment.