fix: type definitions for big dialrequest and persistent peerstore (#1078)

Signed-off-by: Tuyen Nguyen <vutuyen2636@gmail.com>
This commit is contained in:
tuyennhv 2021-12-24 21:46:00 +07:00 committed by GitHub
parent d1c48dcbed
commit cb0d7d6c99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -56,8 +56,8 @@ const METRICS_PENDING_DIAL_TARGETS = 'pending-dial-targets'
* @property {Multiaddr[]} addrs
*
* @typedef PendingDial
* @property {DialRequest} dialRequest
* @property {TimeoutController} controller
* @property {import('./dial-request')} dialRequest
* @property {import('timeout-abort-controller').TimeoutController} controller
* @property {Promise<Connection>} promise
* @property {function():void} destroy
*/

View File

@ -48,6 +48,8 @@ const { updateSelfPeerRecord } = require('./record/utils')
* @typedef {import('libp2p-interfaces/src/pubsub').PubsubOptions} PubsubOptions
* @typedef {import('interface-datastore').Datastore} Datastore
* @typedef {import('./pnet')} Protector
* @typedef {Object} PersistentPeerStoreOptions
* @property {number} [threshold]
*/
/**
@ -110,7 +112,7 @@ const { updateSelfPeerRecord } = require('./record/utils')
* @property {KeychainOptions & import('./keychain/index').KeychainOptions} [keychain]
* @property {MetricsOptions & import('./metrics').MetricsOptions} [metrics]
* @property {import('./peer-routing').PeerRoutingOptions} [peerRouting]
* @property {PeerStoreOptions & import('./peer-store/persistent').PersistentPeerStoreOptions} [peerStore]
* @property {PeerStoreOptions & PersistentPeerStoreOptions} [peerStore]
* @property {import('./transport-manager').TransportManagerOptions} [transportManager]
* @property {Libp2pConfig} [config]
*

View File

@ -8,6 +8,7 @@ const retimer = require('retimer')
/**
* @typedef {import('@vascosantos/moving-average').IMovingAverage} IMovingAverage
* @typedef {import('bignumber.js').BigNumber} Big
*/
class Stats extends EventEmitter {