diff --git a/src/pubsub/index.js b/src/pubsub/index.js index 0ff111c..dcb0c86 100644 --- a/src/pubsub/index.js +++ b/src/pubsub/index.js @@ -24,6 +24,7 @@ const { /** * @typedef {any} Libp2p * @typedef {import('peer-id')} PeerId + * @typedef {import('bl')} BufferList * @typedef {import('../stream-muxer/types').MuxedStream} MuxedStream * @typedef {import('../connection/connection')} Connection * @typedef {import('./message').RPC} RPC @@ -339,7 +340,7 @@ class PubsubBaseProtocol extends EventEmitter { * Responsible for processing each RPC message received by other peers. * * @param {string} idB58Str - peer id string in base58 - * @param {MuxedStream} stream - inbound stream + * @param {AsyncIterable} stream - inbound stream * @param {PeerStreams} peerStreams - PubSub peer * @returns {Promise} */ diff --git a/src/pubsub/peer-streams.js b/src/pubsub/peer-streams.js index 976557c..047a359 100644 --- a/src/pubsub/peer-streams.js +++ b/src/pubsub/peer-streams.js @@ -73,7 +73,7 @@ class PeerStreams extends EventEmitter { /** * Read stream * - * @type {null|MuxedStream} + * @type {null| AsyncIterable} */ this.inboundStream = null } @@ -125,7 +125,6 @@ class PeerStreams extends EventEmitter { // - abortable, set to only return on abort, rather than throw // - transformed with length-prefix transform this._rawInboundStream = stream - // @ts-ignore - abortable returns AsyncIterable and not a MuxedStream this.inboundStream = abortable( pipe( this._rawInboundStream,