Compare commits

..

No commits in common. "1d4cb917c51758e9ba8a164d9094116a9286e825" and "f89e2716f52cdb6e5cba2871d23b581671efa43e" have entirely different histories.

3 changed files with 6 additions and 10 deletions

7
dist/socket.d.ts vendored
View File

@ -18,10 +18,9 @@ export default class Socket extends Duplex {
writable: true;
remotePublicKey: Uint8Array;
private _emulateWebsocket;
addEventListener?: typeof this.addListener;
removeEventListener?: typeof this.removeListener;
send?: typeof this.write;
close?: typeof this.end;
addEventListener: typeof this.addListener;
removeEventListener: typeof this.removeListener;
send: typeof this.write;
constructor({ allowHalfOpen, remoteAddress, remotePort, remotePublicKey, write, emulateWebsocket, }?: SocketOptions);
private _connecting;
get connecting(): boolean;

1
dist/socket.js vendored
View File

@ -29,7 +29,6 @@ class Socket extends streamx_1.Duplex {
this.addEventListener = this.addListener;
this.removeEventListener = this.removeListener;
this.send = this.write;
this.close = this.end;
this.addEventListener("data", (data) =>
// @ts-ignore
this.emit("message", new MessageEvent("data", { data })));

View File

@ -32,10 +32,9 @@ export default class Socket extends Duplex {
public remotePublicKey: Uint8Array;
private _emulateWebsocket: boolean;
declare addEventListener?: typeof this.addListener;
declare removeEventListener?: typeof this.removeListener;
declare send?: typeof this.write;
declare close?: typeof this.end;
declare addEventListener: typeof this.addListener;
declare removeEventListener: typeof this.removeListener;
declare send: typeof this.write;
constructor({
allowHalfOpen = false,
@ -65,7 +64,6 @@ export default class Socket extends Duplex {
this.addEventListener = this.addListener;
this.removeEventListener = this.removeListener;
this.send = this.write;
this.close = this.end;
this.addEventListener("data", (data: any) =>
// @ts-ignore
this.emit("message", new MessageEvent("data", { data }))