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

Add typings for the use with TypeScript #36

Closed
InExtremaRes opened this issue May 7, 2018 · 9 comments
Closed

Add typings for the use with TypeScript #36

InExtremaRes opened this issue May 7, 2018 · 9 comments

Comments

@InExtremaRes
Copy link

Well, I think there is no much to say. At this time react-testing-library has a file for typings.

Is there any plans to add some for this project?

Best regards.

@alexkrolick
Copy link
Collaborator

Yes

@maddijoyce

@InExtremaRes
Copy link
Author

Oh, thank you. I was looking for a file or an issue in this project and never thought to look there.

@maddijoyce
Copy link
Collaborator

Yep, I'm working on this at the moment, I'll be updating soon.

@InExtremaRes
Copy link
Author

I am sorry. Will it include types for the jest-dom custom matchers?

@maddijoyce
Copy link
Collaborator

At this stage, I haven't but I can look into it.

@InExtremaRes
Copy link
Author

Here are some tips for augment jest namespace with the matcher's types. I guess the typings could go that way and do the merge declaration when importing (but I'm not very familiar with namespaces augmentation).

@gnapse
Copy link
Member

gnapse commented May 8, 2018

Actually, regarding jest-dom and typescript, I was thinking that there must be something better to be done than what's described in the README of that repo. I attempted to do something here and would greatly appreciate the review of someone here more knowledgeable of typescript, before I merge it.

@gnapse
Copy link
Member

gnapse commented Jun 8, 2018

Will it include types for the jest-dom custom matchers?

Update about that: jest-dom should be typescript ready, AFAICT. At the very least it's been improved from what was previously referenced above (which required users to do something on their projects to take advantage of jest-dom + typescript, and that's not longer the case). However, any suggestions to improve on that is welcome.

@gnapse
Copy link
Member

gnapse commented Aug 23, 2018

Doesn't this library has typings already? I think this issue can be closed.

alexkrolick pushed a commit to alexkrolick/dom-testing-library that referenced this issue Sep 13, 2018
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

No branches or pull requests

5 participants