-
Notifications
You must be signed in to change notification settings - Fork 444
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
Support for Typescript users #659
Comments
cc everyone who interacted regarding typescript support: |
For lodestar, we are using: https://github.com/chainsafe/libp2p-ts which can be useful to compare generated types or port directly if it's difficult to generate typings. Note: we haven't yet updated to latest version of libp2p, so some stuff might be different. |
I wonder if it makes sense to merge the types upstream? Unless you're goal is to write native typescript files? |
@GregTheGreek the goal is to write jsdocs with typedef that will enable aegir to generate types declarations inline with the source files on build. This will provide the types declarations for the users. They will not be written, but generated by aegir. ipfs/aegir#568 will allow this to happen |
Ah sorry i misread the OP. |
Would it be possible to use something other than 🍎, 🍏? Finding it hard to distinguish between the two as a color deficient individual |
Hello @technicallyty , |
As an update here, we have libp2p types being generated for core since Let me know if you hit issues |
@vasco-santos I will be working on adding typescript support to |
Resolving in favor of #1021 |
Taking into account the adoption of js-libp2p by several typescript projects and the previous discussions around this topic, we decided to create a plan to better enable typescript users.
We will be following the same ideas gathered by the IPFS team in ipfs/js-ipfs#2945. Like IPFS, libp2p modules use ipfs/aegir for the project building. Aegir will be supporting typescript with jsdoc (ipfs/aegir#568) 🎉
We want to start by using JSDoc to declare types for the top level API first and internally we will add types incrementally where we feel it adds value.
The typescript community has previously tried to contribute for getting this support in libp2p, but unfortunately we did not have a plan at the time and we did not get much progress. The libp2p core team will not be able to tackle this over the next months, as we will be working on protocol level improvements, but the contributions of everyone interested in having a better support for libp2p in typescript are welcome!
Let us know if you have questions, and fill free to claim a module by commenting in this issue :)
libp2p-interfaces
js-libp2p
js-libp2p-utils
js-libp2p-bootstrap
js-libp2p-crypto
js-libp2p-crypto-secp256k1
js-libp2p-delegated-content-routing
js-libp2p-delegated-peer-routing
js-libp2p-floodsub
js-libp2p-kad-dht
js-libp2p-mdns
js-libp2p-mplex
js-libp2p-record
js-libp2p-rendezvous
js-libp2p-tcp
js-libp2p-webrtc-star
js-libp2p-webrtc-direct
js-libp2p-webrtc-star
js-libp2p-websockets
js-peer-id
Note that with this effort, we also aim to get #308 to the finish line, thanks to the documentation being generated by typedoc.
The text was updated successfully, but these errors were encountered: