diff --git a/src/peer/tcp.ts b/src/peer/tcp.ts index fb14ca1..62f9b0e 100644 --- a/src/peer/tcp.ts +++ b/src/peer/tcp.ts @@ -18,6 +18,10 @@ export class TcpPeer implements Peer { private _id?: NodeId; + get id(): NodeId { + return this._id as NodeId; + } + set id(value: NodeId) { this._id = value; } diff --git a/src/peer/webSocket.ts b/src/peer/webSocket.ts index b85c043..4474e26 100644 --- a/src/peer/webSocket.ts +++ b/src/peer/webSocket.ts @@ -16,6 +16,10 @@ export class WebSocketPeer implements Peer { private _id?: NodeId; + get id(): NodeId { + return this._id as NodeId; + } + set id(value: NodeId) { this._id = value; }