Preparing search index...
The search index is not available
XYO Platform SDK - v3.6.9
XYO Platform SDK
@xyo-network/module
BaseEmitter
Class BaseEmitter<TParams, TEventData>
Type Parameters
TParams
extends
BaseParams
=
BaseParams
TEventData
extends
EventData
=
EventData
Hierarchy (
View Summary
)
Base
<
TParams
>
BaseEmitter
AbstractModule
Implements
EventFunctions
<
TEventData
>
Index
Constructors
constructor
Properties
event
Data
default
Logger?
global
Instances
global
Instances
Count
History
unique
Name
Accessors
logger
params
history
Interval
history
Time
max
Gc
Frequency
max
History
Depth
Methods
clear
Listeners
emit
emit
Serial
listener
Count
off
off
Any
on
on
Any
once
gc
instance
Count
instance
Counts
start
History
stop
History
Constructors
constructor
new
BaseEmitter
<
TParams
extends
BaseParamsFields
=
BaseParamsFields
,
TEventData
extends
EventData
=
EventData
,
>
(
params
:
TParams
,
)
:
BaseEmitter
<
TParams
,
TEventData
>
Type Parameters
TParams
extends
BaseParamsFields
=
BaseParamsFields
TEventData
extends
EventData
=
EventData
Parameters
params
:
TParams
Returns
BaseEmitter
<
TParams
,
TEventData
>
Properties
event
Data
eventData
:
TEventData
Static
Optional
default
Logger
defaultLogger
?:
Logger
Static
Readonly
global
Instances
globalInstances
:
Record
<
string
,
WeakRef
<
Base
<
undefined
|
BaseParamsFields
>
>
[]
>
Static
Readonly
global
Instances
Count
History
globalInstancesCountHistory
:
Record
<
string
,
number
[]
>
Static
Readonly
unique
Name
uniqueName
:
string
Accessors
logger
get
logger
()
:
undefined
|
Logger
Returns
undefined
|
Logger
params
get
params
()
:
TParams
Returns
TParams
Static
history
Interval
get
historyInterval
()
:
number
Returns
number
set
historyInterval
(
value
:
number
)
:
void
Parameters
value
:
number
Returns
void
Static
history
Time
get
historyTime
()
:
number
Returns
number
set
historyTime
(
value
:
number
)
:
void
Parameters
value
:
number
Returns
void
Static
max
Gc
Frequency
get
maxGcFrequency
()
:
number
Returns
number
set
maxGcFrequency
(
value
:
number
)
:
void
Parameters
value
:
number
Returns
void
Static
max
History
Depth
get
maxHistoryDepth
()
:
number
Returns
number
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
=
keyof
TEventData
,
TEventArgs
extends
EventArgs
=
TEventData
[
TEventName
]
,
>
(
eventName
:
TEventName
,
eventArgs
:
TEventArgs
,
)
:
Promise
<
void
>
Type Parameters
TEventName
extends
string
|
number
|
symbol
=
keyof
TEventData
TEventArgs
extends
EventArgs
=
TEventData
[
TEventName
]
Parameters
eventName
:
TEventName
eventArgs
:
TEventArgs
Returns
Promise
<
void
>
emit
Serial
emitSerial
<
TEventName
extends
string
|
number
|
symbol
=
keyof
TEventData
,
TEventArgs
extends
EventArgs
=
TEventData
[
TEventName
]
,
>
(
eventName
:
TEventName
,
eventArgs
:
TEventArgs
,
)
:
Promise
<
void
>
Type Parameters
TEventName
extends
string
|
number
|
symbol
=
keyof
TEventData
TEventArgs
extends
EventArgs
=
TEventData
[
TEventName
]
Parameters
eventName
:
TEventName
eventArgs
:
TEventArgs
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
:
EventAnyListener
)
:
void
Parameters
listener
:
EventAnyListener
Returns
void
on
on
<
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
on
Any
onAny
(
listener
:
EventAnyListener
)
:
()
=>
void
Parameters
listener
:
EventAnyListener
Returns
()
=>
void
once
once
<
TEventName
extends
string
|
number
|
symbol
>
(
eventName
:
TEventName
,
listener
:
EventListener
<
TEventData
[
TEventName
]
>
,
)
:
()
=>
void
Type Parameters
TEventName
extends
string
|
number
|
symbol
Parameters
eventName
:
TEventName
listener
:
EventListener
<
TEventData
[
TEventName
]
>
Returns
()
=>
void
Static
gc
gc
(
force
?:
boolean
)
:
void
Parameters
Optional
force
:
boolean
Returns
void
gc
(
className
:
string
)
:
void
Parameters
className
:
string
Returns
void
Static
instance
Count
instanceCount
(
className
:
string
)
:
number
Parameters
className
:
string
Returns
number
Static
instance
Counts
instanceCounts
()
:
Record
<
string
,
number
>
Returns
Record
<
string
,
number
>
Static
start
History
startHistory
()
:
void
Returns
void
Static
stop
History
stopHistory
()
:
void
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
event
Data
default
Logger
global
Instances
global
Instances
Count
History
unique
Name
Accessors
logger
params
history
Interval
history
Time
max
Gc
Frequency
max
History
Depth
Methods
clear
Listeners
emit
emit
Serial
listener
Count
off
off
Any
on
on
Any
once
gc
instance
Count
instance
Counts
start
History
stop
History
XYO Platform SDK - v3.6.9
Loading...