EventEmitter
Defined in: index.ts:107
2.0.0
E
extends Record
<string
, any
>
new EventEmitter<
E
>():EventEmitter
<E
>
EventEmitter
<E
>
addListener<
N
>(eventName
,listener
):this
Defined in: index.ts:118
Alias for emitter.on(eventName, listener)
.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
listenerCount<
N
>(eventName
):number
Defined in: index.ts:241
Returns the number of listeners listening to the event named eventName
.
N
extends string
| number
| symbol
N
number
2.0.0
off<
N
>(eventName
,listener
):this
Defined in: index.ts:186
Removes the all specified listener from the listener array for the event eventName
Returns a reference to the EventEmitter
, so that calls can be chained.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
on<
N
>(eventName
,listener
):this
Defined in: index.ts:147
Adds the listener
function to the end of the listeners array for the
event named eventName
. No checks are made to see if the listener
has
already been added. Multiple calls passing the same combination of eventName
and listener
will result in the listener
being added, and called, multiple
times.
Returns a reference to the EventEmitter
, so that calls can be chained.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
once<
N
>(eventName
,listener
):this
Defined in: index.ts:169
Adds a one-timelistener
function for the event named eventName
. The
next time eventName
is triggered, this listener is removed and then invoked.
Returns a reference to the EventEmitter
, so that calls can be chained.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
prependListener<
N
>(eventName
,listener
):this
Defined in: index.ts:258
Adds the listener
function to the beginning of the listeners array for the
event named eventName
. No checks are made to see if the listener
has
already been added. Multiple calls passing the same combination of eventName
and listener
will result in the listener
being added, and called, multiple
times.
Returns a reference to the EventEmitter
, so that calls can be chained.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
prependOnceListener<
N
>(eventName
,listener
):this
Defined in: index.ts:280
Adds a one-timelistener
function for the event named eventName
to the_beginning_ of the listeners array. The next time eventName
is triggered, this
listener is removed, and then invoked.
Returns a reference to the EventEmitter
, so that calls can be chained.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
removeAllListeners<
N
>(event?
):this
Defined in: index.ts:206
Removes all listeners, or those of the specified eventName.
Returns a reference to the EventEmitter
, so that calls can be chained.
N
extends string
| number
| symbol
N
this
2.0.0
removeListener<
N
>(eventName
,listener
):this
Defined in: index.ts:130
Alias for emitter.off(eventName, listener)
.
N
extends string
| number
| symbol
N
(arg
) => void
this
2.0.0
© 2025 Tauri Contributors. CC-BY / MIT