Methods
addListener
- addListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
emit
- emit(event: string | symbol, ...args: any[]): boolean
-
Parameters
-
event: string | symbol
-
Rest ...args: any[]
Returns boolean
eventNames
- eventNames(): (string | symbol)[]
-
Returns (string | symbol)[]
getMaxListeners
- getMaxListeners(): number
-
Returns number
listenerCount
- listenerCount(type: string | symbol): number
-
Parameters
Returns number
listeners
- listeners(event: string | symbol): Function[]
-
Parameters
Returns Function[]
off
- off(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
on
- on(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
once
- once(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
prependListener
- prependListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
prependOnceListener
- prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
rawListeners
- rawListeners(event: string | symbol): Function[]
-
Parameters
Returns Function[]
removeAllListeners
-
Parameters
-
Optional event: string | symbol
removeListener
- removeListener(event: string | symbol, listener: (...args: any[]) => void): EventEmitter
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
setMaxListeners
-
Parameters