algorand / js-algorand-sdk

The official JavaScript SDK for Algorand.
https://algorand.github.io/js-algorand-sdk/
MIT License
285 stars 204 forks source link

algosdk should offer native TypeScript support #265

Closed Ungolim closed 3 years ago

Ungolim commented 3 years ago

Currently:

The time is long overdue for the team (e.g. @jasonpaulos @JasonWeathersby) to offer a TypeScript-first AlgoSDK for the Web3 JavaScript ecosystem

codemaster101 commented 3 years ago

I agree completely. Since most of the development for firms these days is in TypeScript (and more and more firms are choosing TS over JS) it seems like a basic support system. Writing our own type definitions for every blockchain which does not support TypeScript is taxing.

jasonpaulos commented 3 years ago

@lepidotteri thanks for bringing this up. I agree that native TypeScript support would be a major improvement for algosdk and we are currently planning for v2 of the package to be rewritten in TypeScript (as well as contain many other improvements).

In the meantime, I think it's worth pointing out that @robert-zaremba has submitted #245, which contains a type definitions file for algosdk. We haven't yet decided if want to merge it here since it would be difficult to maintain consistent type definitions in a separate file, but this would be a good resource for anyone who needs type definitions immediately.

robert-zaremba commented 3 years ago

Yes, our most up-to date TS typings is available here: https://github.com/scale-it/algorand-builder/tree/master/packages/types-algosdk

We are using it internally. Probably will be good to release it in npm. Let me know and we can do it.

codemaster101 commented 3 years ago

@robert-zaremba I would be really happy if you guys could push it to NPM! Would make life much much easier!

robert-zaremba commented 3 years ago

DONE! We released the TypeScript typings for `js-algorand-sdk. All instructions are available in the README file: https://www.npmjs.com/package/@algorand-builder/types-algosdk

Ungolim commented 3 years ago

DONE! We released the TypeScript typings for `js-algorand-sdk. All instructions are available in the README file: https://www.npmjs.com/package/@algorand-builder/types-algosdk

Great! Next up, rewrite the whole library from scratch in TS

ian-algorand commented 3 years ago

Closing this issue for now as it doesn't seem there are any additional action items. If you'd like to continue the discussion, check out https://forum.algorand.org/

Thanks!