You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now my team faces a problem with types that a coming from Libp2p in case when we want to refer to Libp2p Components.
Because default interface to refer to libp2p is declared in @libp2p/interface-libp2p does not have components defined on it when at the same time libp2p implementation has components declared it created problematic situation for us and forces us to use type casting to keep the possibility to refer to Libp2p components in our TypeScript code.
I'd like to know if was it intentional that Components are not exported from libp2p package?
If so, what is the reasoning for it?
Otherwise is it possible to export the Components interface from the package?
Steps to reproduce the error: N/A
The text was updated successfully, but these errors were encountered:
This has been previously raised in #1567 but the rationale is that Components are the internals of Libp2p and should be obscured from consumers. The Libp2p node interface seeks to be a simple API that exposes methods a consumer should call without having to know the internals of Libp2p's components, I am curious to see the use cases for utilizing Libp2p components directly in your code, could you please share some examples?
Version: [email protected], @libp2p/[email protected]
Severity: Medium
Description:
Right now my team faces a problem with types that a coming from Libp2p in case when we want to refer to Libp2p Components.
Because default interface to refer to libp2p is declared in @libp2p/interface-libp2p does not have components defined on it when at the same time libp2p implementation has components declared it created problematic situation for us and forces us to use type casting to keep the possibility to refer to Libp2p components in our TypeScript code.
I'd like to know if was it intentional that Components are not exported from
libp2p
package?If so, what is the reasoning for it?
Otherwise is it possible to export the
Components
interface from the package?Steps to reproduce the error: N/A
The text was updated successfully, but these errors were encountered: