fix: specify connection direction (#86)

The comment says it can be 'inbound' or 'outbound' so constrain the type to those values.
This commit is contained in:
Alex Potsides 2021-03-22 08:58:10 +00:00 committed by GitHub
parent 2429e7246f
commit 3b960d516f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ const connectionSymbol = Symbol.for('@libp2p/interface-connection/connection')
* @property {number} [close]
*
* @typedef {Object} ConectionStat
* @property {string} direction - connection establishment direction ("inbound" or "outbound").
* @property {'inbound' | 'outbound'} direction - connection establishment direction
* @property {Timeline} timeline - connection relevant events timestamp.
* @property {string} [multiplexer] - connection multiplexing identifier.
* @property {string} [encryption] - connection encryption method identifier.