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

Declare Typescript custom typings #140

Open
pedrobranco opened this issue Jul 25, 2022 · 5 comments
Open

Declare Typescript custom typings #140

pedrobranco opened this issue Jul 25, 2022 · 5 comments
Milestone

Comments

@pedrobranco
Copy link
Collaborator

No description provided.

@pedrobranco pedrobranco added this to the 5.0 milestone Jul 25, 2022
@ChandlerFerry
Copy link

ChandlerFerry commented Nov 14, 2022

@pedrobranco What strategy do you want to work towards for this?

  • Convert to TypeScript?
  • Declaration file in this repo with NPM "types" property?
  • Declaration file in DefinitelyTyped?

While I do not plan to completely solve the issue, I can begin the process to make it easier for other users to continue to build upon.

@pedrobranco
Copy link
Collaborator Author

@ruimarinho WDYT of using declaration file in DefinitelyTyped?

@KorbisInc
Copy link

How is anyone using TS at all in the Bitcoin ecosystem?

  • bitcoinjs/coinselect - no types
  • ruimarinoho/bitcoin-core - no types
  • bitcoinjs/bitcoinjs-lib - types

Another option not mentioned is using JSDoc. https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html

I'll add the JSDoc annotations since nothing exists and open a PR. I only hope it'll be accepted. 😆 I'll base it on #149 - This makes the types completely orthogonal.

I've done the same with bitcoinjs/coinselect. I'll be opening a PR there as well.

@0-don
Copy link

0-don commented Apr 26, 2024

yes types would be nice, why not just add at least the types from index.d.ts in this old puill request #65

@pedrobranco
Copy link
Collaborator Author

why not just add at least the types from index.d.ts

I guess we can go that way yeah.

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

No branches or pull requests

4 participants