-
Notifications
You must be signed in to change notification settings - Fork 57
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
Any plans for adding TypeScript definitions? #28
Comments
I have no plan about it right now, but at the same time, don't have a strong opinion about it. |
We are writing one now. Would you like to ship it with your library or wants us to just add it to Definitely Typed? |
@ali-habibzadeh I'm unfamiliar to TS. Could you explain the difference between those two? |
#29 (just to note) |
There are two methods.
Obviously we are TS devs so we think you should care :) but that's a choice for you. |
Obviously, the 2nd option looks better for me because I'm unfamiliar to TS and I'm unsure I can maintain .d.ts files continuously when we took the 1st option. |
The second option is the best ! please choose two ! |
I think the first option is better because having it in the same repo makes it easier to keep it up to keep the types up to date (no mismatched versions between types and this), and it won't have any regressive effect on existing javascript users. If the types are wrong people will fix them! |
Given the lack of traction here and in #29, I've opened a PR at DefinitelyTyped to add types: DefinitelyTyped/DefinitelyTyped#65278 In my experience, unless the main maintainer of a library commits to keeping the types up-to-date, then it's better to have them be separate and there's a stronger signal of whether the types are out of date or not for a given version. This also allows the community to have better / easier turnaround on fixing the types. pm2 is an example of a package that has its types as part of the module, but it's not maintained by the developer and PRs for types are often ignored / left to linger and so using it in TS is a huge pain. |
Nice work @MasterOdin 😎 That PR has now been merged 🎉 @tagomoris - is it worthwhile closing this issue in favour of the Thanks for your efforts putting together this client, super appreciated! |
Thank you, guys! |
Most serious projects use TS and would be nice to be able to use this lib in those projects.
Do you have any plans to add support for this?
The text was updated successfully, but these errors were encountered: