Skip to content
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

Add TypeScript type definition #74

Closed
sindresorhus opened this issue Jun 27, 2019 · 12 comments · Fixed by #86
Closed

Add TypeScript type definition #74

sindresorhus opened this issue Jun 27, 2019 · 12 comments · Fixed by #86
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Jun 27, 2019

Issuehunt badges

Would be nice to have TypeScript type definitions bundled in this package. The types should be strict and should be generic so it preserves the original function type.

The type definition should follow this styleguide, and should have full docs and type tests.

Some examples:

Note that this is not an easy task and requires you to have advanced TypeScript experience. There have been multiple attempts and a lot of wasted time on my part in the past. If you intend to work on this, please look at the previous attempts and the feedback given there.


IssueHunt Summary

tom-sherman tom-sherman has been rewarded.

Backers (Total: $100.00)

Submitted pull Requests


Tips

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jun 27, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 27, 2019

@issuehunt has funded $80.00 to this issue.


@satyarohith
Copy link

Working on this!

@sindresorhus
Copy link
Owner Author

sindresorhus commented Mar 7, 2021

For anyone wanting to work on this, see the initial attempt and feedback in #76.


Note that this is not an easy task and requires you to have advanced TypeScript experience. There have been multiple attempts and a lot of wasted time on my part in the past. If you intend to work on this, please look at the previous attempts and the feedback given there.

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 24, 2021

@omgimalexis has funded $20.00 to this issue.


@OmgImAlexis
Copy link

@renatobenks
Copy link

renatobenks commented Jul 6, 2021

@sindresorhus I don't get it, is it still an issue? considering the existent type-definitions from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pify, I'm quite a bit confused 🤔

@sindresorhus
Copy link
Owner Author

The best place for types is in the package itself. DefinitelyTyped is just a workaround until packages provide types themselves. Also, the types at DT are not very good.

@renatobenks
Copy link

fair enough @sindresorhus

@renatobenks
Copy link

indeed, those types seem incompleted!

@OmgImAlexis
Copy link

@renatobenks check the link I gave. That's from a commit to update the built in utils's promisify so it should a good reference to base these on. So far while using the ones I linked manually I've had no edge cases come up.

@renatobenks
Copy link

Thank you for the suggestion @OmgImAlexis, I appreciate that! But unfortunately, I still didn't have a concise idea for moving forward from #76

@issuehunt-oss
Copy link

issuehunt-oss bot commented Sep 2, 2022

@sindresorhus has rewarded $90.00 to @tom-sherman. See it on IssueHunt

  • 💰 Total deposit: $100.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $10.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
4 participants