tbtc.js icon indicating copy to clipboard operation
tbtc.js copied to clipboard

Improving types, readme & tests

Open corollari opened this issue 5 years ago • 3 comments

This PR will implement the changes discussed on discord:

  • [x] Convert readme to markdown on CI
  • [x] Generate typescript declarations
  • [x] Initial work on improving tests

And adds a few extra fixes:

  • Fixes the example code on the readme (it was outdated)
  • Adds a type that was forgotten
  • Bumps some dependencies

Also, should I split this into multiple PRs? I thought that given that the changes made here are quite small a single PR might work best.

TS declarations

Once this (or the commit for generating ts declarations) gets merged and published as a package I'll also deprecate the DefinitelyTyped package, as it will be useless at this point.

A note on tests

On discord I mentioned that I'd start working on better tests that use a real environment, however now I think that it's best to focus my time on ln2tbtc (the submarine swaps project) to push it to mainnet. In any case, I've dusted off the previous tests and got them working again, but if you feel that they just don't add much value feel free to remove that commit.

corollari avatar Sep 02 '20 19:09 corollari

Also, currently the typechecks done on the CI are broken, I've tried to replace the jq script with a --project flag that points to jsconfig.json but that hasn't worked (I don't know why tho)

corollari avatar Sep 02 '20 22:09 corollari

Fixed merge conflicts

corollari avatar Sep 10 '20 19:09 corollari

Note: f2da1abb5bc4606f591d0f877e2572f4db0fd024 is also applied on #91

corollari avatar Sep 10 '20 19:09 corollari