Skip to content
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

Update tsconfig example in README #76

Closed
wants to merge 1 commit into from

Conversation

simjes
Copy link
Contributor

@simjes simjes commented Aug 18, 2019

Update tsconfig.json in README to reflect that @types/testing-library__cypress is a dependency, and should not have to be installed by the user.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Because it appears in node_modules/@types/ we actually shouldn't have to do anything at all right? We can remove this section entirely I think.

@simjes
Copy link
Contributor Author

simjes commented Aug 18, 2019

I would think so as well, but that doesn't seem to be the case. I did some research on this, and it seems typescript can't automatically pull in typings for globals. Correct me if I'm wrong.

cypress-io/cypress#1236
https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types
https://www.typescriptlang.org/docs/handbook/module-resolution.html

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

I've confirmed that typings are needed, however it works whether you use @types/testing-library__cypress or @testing-library/cypress. I'm not sure why it works with @testing-library/cypress, but I think it'd probably be better to reference @types/testing-library__cypress personally...

@simjes
Copy link
Contributor Author

simjes commented Aug 20, 2019

Sounds good, I will close it. It works with @testing-library/cypress because of the paths mapping in the tsconfig.json in DefinitelyTyped

@simjes simjes closed this Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants