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