Search
Preparing search index...
The search index is not available
@fujia/hammer
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@fujia/hammer
PubSub
Class PubSub
Hierarchy
PubSub
Index
Constructors
constructor
Properties
callbacks
id
Methods
publish
subscribe
unsubscribe
Constructors
constructor
new
Pub
Sub
(
)
:
PubSub
Returns
PubSub
Properties
Static
callbacks
callbacks
:
Callbacks
= {}
Static
id
id
:
number
= 1
Methods
Static
publish
publish
<
T
>
(
channel
:
string
, data
:
T
)
:
void
Type parameters
T
Parameters
channel:
string
data:
T
Returns
void
Static
subscribe
subscribe
(
channel
:
string
, cb
:
CallableFunction
)
:
void
Parameters
channel:
string
cb:
CallableFunction
Returns
void
Static
unsubscribe
unsubscribe
(
flag
?:
string
)
:
void
Parameters
Optional
flag:
string
Returns
void
Exports
Pub
Sub
constructor
callbacks
id
publish
subscribe
unsubscribe
Generated using
TypeDoc