-
Notifications
You must be signed in to change notification settings - Fork 27
Incompatible argument types #101
Comments
It looks to me like it's only every going to be a |
Actually sometimes it can be a string. I think this only ever worked in the past because the CID constructor took so many input types. |
It is computed in https://github.com/libp2p/js-libp2p-interfaces/blob/master/src/pubsub/utils.js#L100 and I think the |
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110). New implementation modules are: * libp2p-pubsub * libp2p-connection * libp2p-topology * Converts code to typescript (fixes #101) * Adds types for PeerData, PeerStore, Registrar and some other libp2p internals - these will need to be fleshed out properly in a subsequent PR * No CJS, only ESM, only forwards * Upgrades deps that have also gone ESM-only * Renames package folders for consistency I've tried to break some of the circular dependencies in the interfaces (e.g. libp2p depends on pubsub, which depends on libp2p, which depends on pubsub, etc). This hasn't been possible in the tests so I've added `@ts-expect-error` where we access these properties with the aim to revisit it once this has been rolled up to libp2p itself. BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces, some adjustment may be necessary as this gets rolled out
Sorry late reply here, but the reason for the difference is related to libp2p/js-libp2p#680 It's more convenient for the The That |
🎉 This issue has been resolved in version @libp2p/interfaces-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @libp2p/topology-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @libp2p/connection-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @libp2p/pubsub-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The pubsub _publish method takes an arg of
InMessage|RPCMessage
.InMessage
has an optional from field of typestring
,RPCMessage
has an optional from field ofUint8Array|undefined
.These are not compatible. Which one is correct?
The text was updated successfully, but these errors were encountered: