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

Begin migration to TypeScript #295

Closed
jasonpaulos opened this issue Mar 10, 2021 · 1 comment · Fixed by #302
Closed

Begin migration to TypeScript #295

jasonpaulos opened this issue Mar 10, 2021 · 1 comment · Fixed by #302
Assignees
Labels

Comments

@jasonpaulos
Copy link
Contributor

Summary

This SDK is currently written in plain JavaScript and we do not provide any TypeScript definitions. It's time to fix this!

Scope

It will most likely be difficult to migrate the entire library to TypeScript, so let's focus on the commonly used, public parts first, such as the makeTxn functions, Transaction class, and the encoding/decoding functions. After this the Algodv2 class would probably be next, but this will be more difficult because we'll have to also annotate every possible REST API response.

In general we need to:

  • Incorporate TypeScript compilation into this package's build steps.
  • Add types to files one-by-one, focussing on commonly used user-facing classes/functions first.
  • Ensure the compiled JS files and type definitions are included when the package is published.

The TypeScript docs provide some guidance about how to migrate a repo: https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html

Urgency

Many users have requested TypeScript support (#204, #245, #265) since it would greatly improve the usability of our library and catch some bugs a lot sooner.

@jasonpaulos
Copy link
Contributor Author

@jdtzmn is currently working on this on the jacob/typescript-migration branch.

@jasonpaulos jasonpaulos changed the title Migrate to TypeScript Begin migration to TypeScript Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants