mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
Add optional string parameter to removeAllListeners
As socket essentially extends EventEmitter (save emit), and EventEmitter allows passing an event string to removeAllListeners, the typings should be updated to reflect that. I've updated removeAllListeners to take an option event string parameter. Reference [Node 4.1.1](https://nodejs.org/api/events.html#events_emitter_removealllisteners_event) & [Node 0.12.7](https://nodejs.org/docs/latest-v0.12.x/api/events.html#events_emitter_removealllisteners_event)
This commit is contained in:
2
socket.io/socket.io.d.ts
vendored
2
socket.io/socket.io.d.ts
vendored
@@ -687,7 +687,7 @@ declare module SocketIO {
|
||||
* Removes all event listeners on this object
|
||||
* @return This Socket
|
||||
*/
|
||||
removeAllListeners(): Socket;
|
||||
removeAllListeners( event?: string ): Socket;
|
||||
|
||||
/**
|
||||
* Sets the maximum number of listeners this instance can have
|
||||
|
||||
Reference in New Issue
Block a user