Interface EventSubscriber interface EventSubscriber { off < E extends | "unknown" | "connect" | "disconnect" | "close" | "end" | "accept" | "accept:error" | "bind" | "bind:error" | "connect:delay" | "connect:retry" | "close:error" | "handshake" | "handshake:error:protocol" | "handshake:error:auth" | "handshake:error:other" , > ( type : E , listener : ( data : EventOfType < E > ) => void , ) : EventSubscriber ; on < E extends | "unknown" | "connect" | "disconnect" | "close" | "end" | "accept" | "accept:error" | "bind" | "bind:error" | "connect:delay" | "connect:retry" | "close:error" | "handshake" | "handshake:error:protocol" | "handshake:error:auth" | "handshake:error:other" , > ( type : E , listener : ( data : EventOfType < E > ) => void , ) : EventSubscriber ; } Methodsoff off < E extends | "unknown" | "connect" | "disconnect" | "close" | "end" | "accept" | "accept:error" | "bind" | "bind:error" | "connect:delay" | "connect:retry" | "close:error" | "handshake" | "handshake:error:protocol" | "handshake:error:auth" | "handshake:error:other" , > ( type : E , listener : ( data : EventOfType < E > ) => void , ) : EventSubscriber Type Parameters E extends | "unknown" | "connect" | "disconnect" | "close" | "end" | "accept" | "accept:error" | "bind" | "bind:error" | "connect:delay" | "connect:retry" | "close:error" | "handshake" | "handshake:error:protocol" | "handshake:error:auth" | "handshake:error:other" on on < E extends | "unknown" | "connect" | "disconnect" | "close" | "end" | "accept" | "accept:error" | "bind" | "bind:error" | "connect:delay" | "connect:retry" | "close:error" | "handshake" | "handshake:error:protocol" | "handshake:error:auth" | "handshake:error:other" , > ( type : E , listener : ( data : EventOfType < E > ) => void , ) : EventSubscriber Type Parameters E extends | "unknown" | "connect" | "disconnect" | "close" | "end" | "accept" | "accept:error" | "bind" | "bind:error" | "connect:delay" | "connect:retry" | "close:error" | "handshake" | "handshake:error:protocol" | "handshake:error:auth" | "handshake:error:other"
Removes the specified listener function from the list of functions to call when the given event is observed.