-
Notifications
You must be signed in to change notification settings - Fork 467
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
chore(typescript): move typings to DefinitelyTyped #337
Conversation
BREAKING: remove TypeScript definitions from repo
It would be best to wait to merge until the types are published in DefinitelyTyped and then increment the major version number. |
Are types gonna be published under "testing-library" namespace? We had this PR opened in Vue Testing Library to provide types locally (which relied on DTL types), so I believe we should follow other libraries' directions and publish types next to them. |
Yes, I think the way to do it is to mirror the package name directly in DefinitelyTyped |
], | ||
"dependencies": { | ||
"@babel/runtime": "^7.5.5", | ||
"@sheerun/mutationobserver-shim": "^0.3.2", | ||
"@types/testing-library__dom": "^6.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I've added this as a dep. Here's what things look like before any of these changes (with the current 6.0.0):
And here's what it looks like before I added this dependency (with 6.0.1-alpha.0):
And here's what it looks like after I added this dependency (with 6.0.1-alpha.1):
So as far as the consumer is concerned, there's absolutely no change. And if someone wants to have more control over the version of the typings, then they can install @types/testing-library__dom
themselves and npm
or yarn
will de-dupe to whatever version they want.
This is getting a 👍 from me. Let's do it!
🎉 This PR is included in version 6.0.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
See testing-library/react-testing-library#437, #335
Remove the TypeScript typedefs from this repo in favor of having the community maintain them at DefinitelyTyped.
Why
There are no core teammembers with the TS knowledge needed to maintain the types, and they are not well tested or integrated with the codebase.
See also reduxjs/redux#3500