react-dragtastic icon indicating copy to clipboard operation
react-dragtastic copied to clipboard

Typescript types for DefinitelyTyped repository

Open nscarcella opened this issue 7 years ago • 6 comments

Hello!

Before anything else: thanks for this great library! I spent so much time looking for a way to cleanly handle d&d I started to believe there was no easy way.

I would very much like to use this on my TypeScript projects, but I noticed there is no type definition published for it on DefinitelyTyped, so I took the liberty of translating the .js.flow file to a TypeScript module and made a pull request (you can find it here).

I hope this is OK with you and, of course, if you want to review the pull request and add your own feedback, it would be very welcome.

Best regards.

nscarcella avatar Jul 30 '18 04:07 nscarcella

Thanks @nscarcella! I'm personally not very familiar with Typescript or Flow, @TrySound has graciously provided all of the flowtype support for dragtastic. Thanks for transcribing it into TypeScript. As the dragtastic api changes over time, would you like to be notified so you can update the typescript definitions?

chrisjpatty avatar Jul 31 '18 23:07 chrisjpatty

It's always better to keep definitions in source repo so they could easily be updated.

TrySound avatar Jul 31 '18 23:07 TrySound

I guess I'm not familiar with DefinitelyTyped. Is it a repository of typescript definitions, or just a directory that links to repositories with typescript definitions. I agree that it probably makes sense to maintain them with the source repo so they stay in sync.

chrisjpatty avatar Jul 31 '18 23:07 chrisjpatty

It's a repo with definitions.

TrySound avatar Jul 31 '18 23:07 TrySound

Ah, makes sense. @nscarcella would you be willing to open a pull request into this repo with your definitions included? That way there's a more central place to make sure they stay updated.

chrisjpatty avatar Jul 31 '18 23:07 chrisjpatty

Hi @chrisjpatty, @TrySound is right, adding the types to the core would be the absolute best. I just made a PR with the necessary changes and I'll be happy to help maintain it in my spare time, just send me a notification.

nscarcella avatar Aug 01 '18 01:08 nscarcella