Skip to content

chore(typescript): move typings to DefinitelyTyped#337

Merged
kentcdodds merged 2 commits into
testing-library:masterfrom
alexkrolick:delete-ts
Aug 15, 2019
Merged

chore(typescript): move typings to DefinitelyTyped#337
kentcdodds merged 2 commits into
testing-library:masterfrom
alexkrolick:delete-ts

Conversation

@alexkrolick

@alexkrolick alexkrolick commented Aug 11, 2019

Copy link
Copy Markdown
Collaborator

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

BREAKING: remove TypeScript definitions from repo
@nickserv

nickserv commented Aug 12, 2019

Copy link
Copy Markdown
Member

It would be best to wait to merge until the types are published in DefinitelyTyped and then increment the major version number.

nickserv
nickserv previously approved these changes Aug 12, 2019
@afontcu

afontcu commented Aug 12, 2019

Copy link
Copy Markdown
Member

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.

@alexkrolick

Copy link
Copy Markdown
Collaborator Author

Yes, I think the way to do it is to mirror the package name directly in DefinitelyTyped

Comment thread package.json
"dependencies": {
"@babel/runtime": "^7.5.5",
"@sheerun/mutationobserver-shim": "^0.3.2",
"@types/testing-library__dom": "^6.0.0",

Copy link
Copy Markdown
Member

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):

Screen Shot 2019-08-15 at 1 01 14 PM

And here's what it looks like before I added this dependency (with 6.0.1-alpha.0):

Screen Shot 2019-08-15 at 1 00 12 PM

And here's what it looks like after I added this dependency (with 6.0.1-alpha.1):

Screen Shot 2019-08-15 at 1 00 32 PM

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!

@kentcdodds kentcdodds changed the title chore(typescript): remove typings chore(typescript): move typings to DefinitelyTyped Aug 15, 2019
@kentcdodds kentcdodds merged commit 1682f5a into testing-library:master Aug 15, 2019
@kentcdodds

Copy link
Copy Markdown
Member

🎉 This PR is included in version 6.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants