IEventEmitter interface
Node.jsnet 모듈의 EventEmitter를 나타냅니다.
이 인터페이스는 프레임워크를 지원하며 코드에 대해 직접 호출할 수 없습니다.
메서드
메서드 세부 정보
addListener(string | symbol, (args: any[]) => void)
function addListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
emit(string | symbol, any[])
function emit(event: string | symbol, args: any[]): boolean
매개 변수
- event
-
string | symbol
- args
-
any[]
반환
boolean
eventNames()
function eventNames(): Array<string | symbol>
반환
Array<string | symbol>
getMaxListeners()
function getMaxListeners(): number
반환
number
listenerCount(string | symbol)
function listenerCount(type: string | symbol): number
매개 변수
- type
-
string | symbol
반환
number
listeners(string | symbol)
function listeners(event: string | symbol): Function[]
매개 변수
- event
-
string | symbol
반환
Function[]
off(string | symbol, (args: any[]) => void)
function off(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
on(string | symbol, (args: any[]) => void)
function on(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
once(string | symbol, (args: any[]) => void)
function once(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
prependListener(string | symbol, (args: any[]) => void)
function prependListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
prependOnceListener(string | symbol, (args: any[]) => void)
function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
rawListeners(string | symbol)
function rawListeners(event: string | symbol): Function[]
매개 변수
- event
-
string | symbol
반환
Function[]
removeAllListeners(string | symbol)
function removeAllListeners(event?: string | symbol): this
매개 변수
- event
-
string | symbol
반환
this
removeListener(string | symbol, (args: any[]) => void)
function removeListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
setMaxListeners(number)
function setMaxListeners(n: number): this
매개 변수
- n
-
number
반환
this