-
Notifications
You must be signed in to change notification settings - Fork 466
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
Convert codebase to TypeScript #494
Comments
I definitely understand the desire here. I'll hold on giving my opinion until I hear what other maintainers have to say about it. |
Couple of loose points that are not meant as a final 👍 or 👎
On a personal note: The PS: |
On the subject of TypeScript holding of potential contributions: We also use contributor-hostile pre-commit hooks. So if there's any concern that beginners might not contribute I would start by removing pre-commit hooks. |
I'm wrestling now with a type / mis-match / version mess using
This pulls in transitive types:
None of these are working for me. I have tons of breaking import problems when I try to build or run my tests. Here's an example from This is mega-frustrating. Can anyone advise on a release version that works? The last combo I had that worked for us was:
After trying to do minor semver upgrade or major, nothing works again. I would love it if either this codebase were converted entirely to TS, or you publish the types with the code again so they track with each release. I can never tell which definitely typed version is supposed to match which release. There's very little effort to document that, other than the transitive dependency which is pulled, but as stated earlier, that is fraught with problems now. Also note related discussion in this react-testing-library issue |
I'm willing to move the typings back into our repo as separate Who wants to work on the first phase? |
the crowd cheers
the crowd grows silent |
I want to add really quick here for anyone who might be working on this: For the first PR, PLEASE keep it as small as possible or at least make it easy to follow what's going on commit-by-commit. I don't want to review a monster PR that changes everything in the codebase. Thanks <3 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm thinking of starting with the waiting functions since they're commonly reused, and ending with the query functions since why seem complex and will probably involve higher level mapped types. |
Hi guys, apologies for adding noise to this issue if it's been abandoned, completed, or otherwise resolved. TL;DR: How can I help? What's the status of this issue? I noticed that there have been somewhat recently merged contributions pertaining to TS, but not any formal announcements or progress tracked in this issue - so may I ask what the progress or state of this is? I wanted to ask because some comments above pertaining to suggested scoping for first contributions by @nickmccurdy have been hidden, so I didn't know if there are currently any preferences by the maintainers as to how someone can contribute. Further adding to my (perhaps unwarranted) confusion is that there appear to be some MRs that are explicit TS conversions vs inlined or imported definitely-typed declarations. So what is the road we're taking? |
I'll try to track the related PRs here, then we can split up work on any remaining files:
I think these were hidden because they were already resolved, but you should still be able to expand them with
I think we previously agreed to gradually move all our packages to first class TypeScript conversion. We may still leave some declarations around until the remaining JS files have been converted though. |
As of Aug 6th the 4 PRs references in the comment immediately before mine convert (or attempt to) the following files:
|
Here's what I'm tackling. I'll update before and after every PR. Edit: My PRs/Files changed:
|
…-library#494) Also update test snapshots
…ing-library#494) Also update test snapshots
With my third open PR above (#1009 ), plus my others and the rest I've listed 2 comments prior, the work of converting all the remaining files in My question to maintainers:
|
I'm sorry, I'm afraid I don't have the bandwidth to work on this 😬 |
Hi guys, I'm a first-time contributor and want to help with this issue. Is there anything left that needs to be migrated to typescript? If not, is there any other issue that might be good for me ? |
Hey, is there still anything that needs to be done on this issue? |
Describe the feature you'd like:
Accurate and timely TypeScript types.
Currently types are manually maintained in the
@types/
project so they are only updated after the fact and are prone to human error and implementation drift.Suggested implementation:
Convert
@testing-library/dom
to TypeScript.Describe alternatives you've considered:
The main alternative is to leave things the way they are. Unfortunately this leaves types manually updated after the fact. This is slow, depend on third-parties (Microsoft), and is error prone.
ignore
option inByText
queries #407waitForElementOptions
argument is supplied. #291I'm sure there are other issues filed on the DefinitelyTyped repo.
Another alternative is to require DefinitelyTyped types as part of general contributions to this project. This would be a big increase to the barrier of entry as contributors would have to know how to write types and update DefinitelyTyped.
Teachability, Documentation, Adoption, Migration Strategy:
I'd look at doing a multi-stage conversion
src
filestests
files (this could be delayed until a future date)TypeScript does add some additional complexity in tooling and would increase the barrier of entry for contributors. This is also an opportunity to to create a simple and supportive implementation that people less familiar with TypeScript and contribute to. It would be important to create some good contributing guides on working with types (or identify and recommend some good third-party guides).
Potentially there would be bugs uncovered and fixed in the codebase with the conversion.
The text was updated successfully, but these errors were encountered: