sindresorhus/pify

Add TypeScript type definition #74

sindresorhus posted onGitHub

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 has funded $80.00 to this issue.


posted by issuehunt-app[bot] almost 6 years ago

Working on this!

posted by satyarohith almost 6 years ago

For anyone wanting to work on this, see the initial attempt and feedback in https://github.com/sindresorhus/pify/pull/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.

posted by sindresorhus about 4 years ago

@omgimalexis has funded $20.00 to this issue.


posted by issuehunt-app[bot] almost 4 years ago
posted by OmgImAlexis almost 4 years ago

@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 🤔

posted by renatobenks almost 4 years ago

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.

posted by sindresorhus almost 4 years ago

fair enough @sindresorhus

posted by renatobenks over 3 years ago

indeed, those types seem incompleted!

posted by renatobenks over 3 years ago

@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.

posted by OmgImAlexis over 3 years ago

Thank you for the suggestion @OmgImAlexis, I appreciate that! But unfortunately, I still didn't have a concise idea for moving forward from https://github.com/sindresorhus/pify/pull/76

posted by renatobenks over 3 years ago

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

  • :moneybag: Total deposit: $100.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $10.00
posted by issuehunt-app[bot] over 2 years ago

Fund this Issue

$100.00
Rewarded

Rewarded pull request

Other pull requests

Recent activities

tom-sherman was rewarded by sindresorhus for sindresorhus/pify# 74
over 2 years ago
tom-sherman submitted an output to  sindresorhus/ pify# 74
over 2 years ago