fix: need a getter for id
This commit is contained in:
parent
31e63f6c63
commit
fbffb1da72
|
@ -18,6 +18,10 @@ export class TcpPeer implements Peer {
|
||||||
|
|
||||||
private _id?: NodeId;
|
private _id?: NodeId;
|
||||||
|
|
||||||
|
get id(): NodeId {
|
||||||
|
return this._id as NodeId;
|
||||||
|
}
|
||||||
|
|
||||||
set id(value: NodeId) {
|
set id(value: NodeId) {
|
||||||
this._id = value;
|
this._id = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,10 @@ export class WebSocketPeer implements Peer {
|
||||||
|
|
||||||
private _id?: NodeId;
|
private _id?: NodeId;
|
||||||
|
|
||||||
|
get id(): NodeId {
|
||||||
|
return this._id as NodeId;
|
||||||
|
}
|
||||||
|
|
||||||
set id(value: NodeId) {
|
set id(value: NodeId) {
|
||||||
this._id = value;
|
this._id = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue