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 support #8

Open
SolcAndMe opened this issue Oct 21, 2022 · 2 comments
Open

Add typescript support #8

SolcAndMe opened this issue Oct 21, 2022 · 2 comments

Comments

@SolcAndMe
Copy link
Contributor

No description provided.

@0xTARC
Copy link
Contributor

0xTARC commented Oct 24, 2022

For bundling the SDK into a typescript package, looks like mycelium pools sdk uses this command for bundling their typescript package:
tsc && babel src --extensions \".ts\" --out-dir ./dist

link to repo: https://github.com/mycelium-ethereum/pools-js/blob/master/package.json

Might also need to change a couple tsconfig settings. This guide looks nice & minimal for configuring that: https://cameronnokes.com/blog/the-30-second-guide-to-publishing-a-typescript-package-to-npm/ . Could also probably copy the pools-js tsconfig as well

@0xTARC 0xTARC self-assigned this Oct 28, 2022
@0xTARC
Copy link
Contributor

0xTARC commented Nov 6, 2022

Work started here: #12

Still needs:

  • Changing src/index.js to .ts file (with passing tests)
  • Changing test/test.js to ts file
  • Test the index.ts file directly instead of testing the generated js. (imo superior, open to other opinions though)
  • Add types to sdk functions (src/index.ts)

@0xTARC 0xTARC removed their assignment Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants