-
Notifications
You must be signed in to change notification settings - Fork 101
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
feat: add declaration file to prevent type error #77
feat: add declaration file to prevent type error #77
Conversation
Yeah this would be appreciated to have merged. If it's a worry to keep types maintained, JSDoc can be used to both document and derive types, while remaining pure JS. After hearing the Svelte people taking this approach I looked into it and makes a lot of sense from a lib development perspective. https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html |
Thx, I updated following your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Overtorment I gave you write permissions. Also, what is your npm user name? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defer to @Overtorment
Thank you everyone for getting this in ❤️ |
... shouldn't this d.ts file be referenced in package.json? |
Yes, in the types property, as you probably read. |
add types in package.json in 683e6df |
@Overtorment merge when ready. |
@junderw i dont have npm account. dont trust them |
I made PR #82 to calculate fee more precisely(varying on type of input/output), which also adds |
So this type declarations won't be published to npm ? |
@griga If u need typed one in npm u can use my forked version. It also supports segwit fee calculation. |
I know it's pure js project, but a lot of typescript dev utilizes this module to optimize UTXO selection for bitcoin transaction. Just adding simple declaration file will make this library much more usable for typescript dev!