mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-28 05:11:04 +00:00
fix: remove inline arg types from function definitions (#916)
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
This commit is contained in:
parent
906315ce73
commit
2af692fb4d
@ -104,7 +104,7 @@
|
|||||||
"it-pipe": "^1.1.0",
|
"it-pipe": "^1.1.0",
|
||||||
"it-take": "1.0.0",
|
"it-take": "1.0.0",
|
||||||
"libp2p-crypto": "^0.19.0",
|
"libp2p-crypto": "^0.19.0",
|
||||||
"libp2p-interfaces": "^0.10.0",
|
"libp2p-interfaces": "^0.10.1",
|
||||||
"libp2p-utils": "^0.3.1",
|
"libp2p-utils": "^0.3.1",
|
||||||
"mafmt": "^9.0.0",
|
"mafmt": "^9.0.0",
|
||||||
"merge-options": "^3.0.4",
|
"merge-options": "^3.0.4",
|
||||||
|
@ -222,6 +222,7 @@ class Upgrader {
|
|||||||
}) {
|
}) {
|
||||||
/** @type {import("libp2p-interfaces/src/stream-muxer/types").Muxer} */
|
/** @type {import("libp2p-interfaces/src/stream-muxer/types").Muxer} */
|
||||||
let muxer
|
let muxer
|
||||||
|
/** @type {import("libp2p-interfaces/src/connection/connection").CreatedMuxedStream | undefined} */
|
||||||
let newStream
|
let newStream
|
||||||
/** @type {Connection} */
|
/** @type {Connection} */
|
||||||
let connection // eslint-disable-line prefer-const
|
let connection // eslint-disable-line prefer-const
|
||||||
@ -249,7 +250,7 @@ class Upgrader {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
newStream = async (/** @type {string | string[]} */ protocols) => {
|
newStream = async (protocols) => {
|
||||||
log('%s: starting new stream on %s', direction, protocols)
|
log('%s: starting new stream on %s', direction, protocols)
|
||||||
const muxedStream = muxer.newStream()
|
const muxedStream = muxer.newStream()
|
||||||
const mss = new Multistream.Dialer(muxedStream)
|
const mss = new Multistream.Dialer(muxedStream)
|
||||||
@ -309,8 +310,8 @@ class Upgrader {
|
|||||||
},
|
},
|
||||||
newStream: newStream || errConnectionNotMultiplexed,
|
newStream: newStream || errConnectionNotMultiplexed,
|
||||||
getStreams: () => muxer ? muxer.streams : errConnectionNotMultiplexed(),
|
getStreams: () => muxer ? muxer.streams : errConnectionNotMultiplexed(),
|
||||||
close: async (/** @type {Error | undefined} */ err) => {
|
close: async () => {
|
||||||
await maConn.close(err)
|
await maConn.close()
|
||||||
// Ensure remaining streams are aborted
|
// Ensure remaining streams are aborted
|
||||||
if (muxer) {
|
if (muxer) {
|
||||||
muxer.streams.map(stream => stream.abort())
|
muxer.streams.map(stream => stream.abort())
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"libp2p-delegated-content-routing": "^0.9.0",
|
"libp2p-delegated-content-routing": "^0.9.0",
|
||||||
"libp2p-delegated-peer-routing": "^0.8.2",
|
"libp2p-delegated-peer-routing": "^0.8.2",
|
||||||
"libp2p-gossipsub": "^0.8.0",
|
"libp2p-gossipsub": "^0.8.0",
|
||||||
"libp2p-interfaces": "^0.8.4",
|
"libp2p-interfaces": "^0.10.1",
|
||||||
"libp2p-kad-dht": "^0.21.0",
|
"libp2p-kad-dht": "^0.21.0",
|
||||||
"libp2p-mplex": "^0.10.2",
|
"libp2p-mplex": "^0.10.2",
|
||||||
"libp2p-noise": "^2.0.5",
|
"libp2p-noise": "^2.0.5",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user