diff --git a/lib/node.js b/lib/node.js index c634d2398c8..cd89916ec37 100644 --- a/lib/node.js +++ b/lib/node.js @@ -804,27 +804,26 @@ declare module "dns" { declare class events$EventEmitter { // deprecated - static listenerCount(emitter: events$EventEmitter, event: string): number; + static listenerCount(emitter: events$EventEmitter, event: string | Symbol): number; static defaultMaxListeners: number; - addListener(event: string, listener: Function): this; - emit(event: string, ...args:Array): boolean; - eventNames(): Array; - listeners(event: string): Array; - listenerCount(event: string): number; - on(event: string, listener: Function): this; - once(event: string, listener: Function): this; - prependListener(event: string, listener: Function): this; - prependOnceListener(event: string, listener: Function): this; - removeAllListeners(event?: string): this; - removeListener(event: string, listener: Function): this; - off(event: string, listener: Function): this; + addListener(event: string | Symbol, listener: Function): this; + emit(event: string | Symbol, ...args: Array): boolean; + eventNames(): Array; + listeners(event: string | Symbol): Array; + listenerCount(event: string | Symbol): number; + on(event: string | Symbol, listener: Function): this; + once(event: string | Symbol, listener: Function): this; + prependListener(event: string | Symbol, listener: Function): this; + prependOnceListener(event: string | Symbol, listener: Function): this; + removeAllListeners(event?: string | Symbol): this; + removeListener(event: string | Symbol, listener: Function): this; + off(event: string | Symbol, listener: Function): this; setMaxListeners(n: number): this; getMaxListeners(): number; - rawListeners(event: string): Array; + rawListeners(event: string | Symbol): Array; } - declare module "events" { // TODO: See the comment above the events$EventEmitter declaration declare class EventEmitter extends events$EventEmitter {