diff --git a/dist/peer.d.ts b/dist/peer.d.ts index bc516b9..4cf3ae7 100644 --- a/dist/peer.d.ts +++ b/dist/peer.d.ts @@ -42,7 +42,8 @@ export default class Peer { private _onsend; private _onclose; private _emulateWebsocket; - private _channel?; constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket, }: PeerOptionsWithProxy & DataSocketOptions); + private _channel?; + get channel(): any; init(): Promise; } diff --git a/dist/peer.js b/dist/peer.js index b46a4ca..1e4ecf7 100644 --- a/dist/peer.js +++ b/dist/peer.js @@ -15,7 +15,6 @@ class Peer { _onsend; _onclose; _emulateWebsocket; - _channel; constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket = false, }) { this._proxy = proxy; this._peer = peer; @@ -26,6 +25,10 @@ class Peer { this._onclose = onclose?.bind(undefined, this); this._emulateWebsocket = emulateWebsocket; } + _channel; + get channel() { + return this._channel; + } async init() { const write = async (data, cb) => { pipe.send(data);