mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-28 08:21:33 +00:00
chore: add types checker script and more fixes on the jsdocs
This commit is contained in:
@ -7,7 +7,6 @@ const errCode = require('err-code')
|
||||
const { codes } = require('./errors')
|
||||
|
||||
/**
|
||||
* @typedef {import('peer-id')} PeerId
|
||||
* @typedef {import('multiaddr')} Multiaddr
|
||||
*/
|
||||
|
||||
@ -16,7 +15,7 @@ const { codes } = require('./errors')
|
||||
* If a multiaddr is received, the addressBook is updated.
|
||||
*
|
||||
* @param {PeerId|multiaddr|string} peer
|
||||
* @returns {{ id: PeerId, multiaddrs: Multiaddr[] }}
|
||||
* @returns {{ id: PeerId, multiaddrs: Multiaddr[]|undefined }}
|
||||
*/
|
||||
function getPeer (peer) {
|
||||
if (typeof peer === 'string') {
|
||||
|
Reference in New Issue
Block a user