XYO Platform SDK - v3.10.6
Preparing search index...
@xyo-network/modules
EventFunctions
Interface EventFunctions<TEventData>
interface
EventFunctions
<
TEventData
extends
EventData
>
{
eventData
:
TEventData
;
clearListeners
(
eventNames
:
keyof
TEventData
|
(
keyof
TEventData
)
[]
)
:
void
;
emit
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
eventArgs
:
TEventData
[
TEventName
]
,
)
:
Promise
<
void
>
;
emitSerial
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
eventArgs
:
TEventData
[
TEventName
]
,
)
:
Promise
<
void
>
;
listenerCount
(
eventNames
:
keyof
TEventData
|
(
keyof
TEventData
)
[]
)
:
number
;
off
<
TEventName
extends
string
|
number
|
symbol
>
(
eventNames
:
TEventName
|
TEventName
[]
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
void
;
offAny
(
listener
:
Promise
<
void
>
|
EventAnyListener
<
EventArgs
>
)
:
void
;
on
<
TEventName
extends
string
|
number
|
symbol
>
(
eventNames
:
TEventName
|
TEventName
[]
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
EventUnsubscribeFunction
;
onAny
(
listener
:
EventAnyListener
)
:
EventUnsubscribeFunction
;
once
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
EventUnsubscribeFunction
;
}
Type Parameters
TEventData
extends
EventData
Hierarchy (
View Summary
)
EventFunctions
Module
Implemented by
BaseEmitter
Events
Index
Properties
event
Data
Methods
clear
Listeners
emit
emit
Serial
listener
Count
off
off
Any
on
on
Any
once
Properties
event
Data
eventData
:
TEventData
Methods
clear
Listeners
clearListeners
(
eventNames
:
keyof
TEventData
|
(
keyof
TEventData
)
[]
)
:
void
Parameters
eventNames
:
keyof
TEventData
|
(
keyof
TEventData
)
[]
Returns
void
emit
emit
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
eventArgs
:
TEventData
[
TEventName
]
,
)
:
Promise
<
void
>
Type Parameters
TEventName
extends
string
|
number
|
symbol
Parameters
eventName
:
TEventName
eventArgs
:
TEventData
[
TEventName
]
Returns
Promise
<
void
>
emit
Serial
emitSerial
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
eventArgs
:
TEventData
[
TEventName
]
,
)
:
Promise
<
void
>
Type Parameters
TEventName
extends
string
|
number
|
symbol
Parameters
eventName
:
TEventName
eventArgs
:
TEventData
[
TEventName
]
Returns
Promise
<
void
>
listener
Count
listenerCount
(
eventNames
:
keyof
TEventData
|
(
keyof
TEventData
)
[]
)
:
number
Parameters
eventNames
:
keyof
TEventData
|
(
keyof
TEventData
)
[]
Returns
number
off
off
<
TEventName
extends
string
|
number
|
symbol
>
(
eventNames
:
TEventName
|
TEventName
[]
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
void
Type Parameters
TEventName
extends
string
|
number
|
symbol
Parameters
eventNames
:
TEventName
|
TEventName
[]
listener
:
EventListener
<
TEventData
[
TEventName
]
>
Returns
void
off
Any
offAny
(
listener
:
Promise
<
void
>
|
EventAnyListener
<
EventArgs
>
)
:
void
Parameters
listener
:
Promise
<
void
>
|
EventAnyListener
<
EventArgs
>
Returns
void
on
on
<
TEventName
extends
string
|
number
|
symbol
>
(
eventNames
:
TEventName
|
TEventName
[]
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
EventUnsubscribeFunction
Type Parameters
TEventName
extends
string
|
number
|
symbol
Parameters
eventNames
:
TEventName
|
TEventName
[]
listener
:
EventListener
<
TEventData
[
TEventName
]
>
Returns
EventUnsubscribeFunction
on
Any
onAny
(
listener
:
EventAnyListener
)
:
EventUnsubscribeFunction
Parameters
listener
:
EventAnyListener
Returns
EventUnsubscribeFunction
once
once
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
EventUnsubscribeFunction
Type Parameters
TEventName
extends
string
|
number
|
symbol
Parameters
eventName
:
TEventName
listener
:
EventListener
<
TEventData
[
TEventName
]
>
Returns
EventUnsubscribeFunction
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
event
Data
Methods
clear
Listeners
emit
emit
Serial
listener
Count
off
off
Any
on
on
Any
once
XYO Platform SDK - v3.10.6
Loading...