diff --git a/dist/socket.d.ts b/dist/socket.d.ts index f2f7720..b51c9c5 100644 --- a/dist/socket.d.ts +++ b/dist/socket.d.ts @@ -31,7 +31,9 @@ export default class Socket extends Duplex { family: AddressFamily; }; addEventListener: (event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents[TEvent] : (...args: any[]) => void) => this; + on: (event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents[TEvent] : (...args: any[]) => void) => this; removeEventListener: (event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents[TEvent] : (...args: any[]) => void) => this; + off: (event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents[TEvent] : (...args: any[]) => void) => this; static isIP(input: string): number; static isIPv4(input: string): boolean; static isIPv6(input: string): boolean; diff --git a/dist/socket.js b/dist/socket.js index 3ce1a0d..69da1cc 100644 --- a/dist/socket.js +++ b/dist/socket.js @@ -65,7 +65,9 @@ class Socket extends streamx_1.Duplex { }; } addEventListener = this.addListener; + on = this.addListener; removeEventListener = this.removeListener; + off = this.removeListener; static isIP(input) { if (Socket.isIPv4(input)) { return 4;