Preparing search index...
The search index is not available
Nymph.js 1.0.0-beta.81
Nymph.js 1.0.0-beta.81
@nymphjs/client-node
PubSub
Class PubSub
Hierarchy (
view full
)
PubSub
PubSub
Index
Constructors
constructor
Methods
authenticate
close
connect
is
Connection
is
Connection
Connecting
is
Connection
Open
off
on
subscribe
Entities
subscribe
Entity
subscribeUID
subscribe
With
update
Array
Constructors
constructor
new
Pub
Sub
(
nymphOptions
,
nymph
)
:
PubSub
Parameters
nymphOptions
:
NymphOptions
nymph
:
Nymph
Returns
PubSub
Methods
authenticate
authenticate
(
authToken
,
switchToken
?
)
:
void
Parameters
authToken
:
null
|
string
Optional
switchToken
:
null
|
string
Returns
void
close
close
(
)
:
void
Returns
void
connect
connect
(
)
:
void
Returns
void
is
Connection
is
Connection
(
)
:
boolean
Returns
boolean
is
Connection
Connecting
is
Connection
Connecting
(
)
:
boolean
Returns
boolean
is
Connection
Open
is
Connection
Open
(
)
:
boolean
Returns
boolean
off
off
<
T
>
(
event
,
callback
)
:
boolean
Type Parameters
T
extends
PubSubEventType
Parameters
event
:
T
callback
:
T
extends
"connect"
?
PubSubConnectCallback
:
T
extends
"disconnect"
?
PubSubDisconnectCallback
:
T
extends
"error"
?
PubSubErrorCallback
:
never
Returns
boolean
on
on
<
T
>
(
event
,
callback
)
:
(
(
)
=>
boolean
)
Type Parameters
T
extends
PubSubEventType
Parameters
event
:
T
callback
:
T
extends
"connect"
?
PubSubConnectCallback
:
T
extends
"disconnect"
?
PubSubDisconnectCallback
:
T
extends
"error"
?
PubSubErrorCallback
:
never
Returns
(
(
)
=>
boolean
)
(
)
:
boolean
Returns
boolean
subscribe
Entities
subscribe
Entities
<
T
>
(
options
,
...
selectors
)
:
PubSubSubscribable
<
PubSubUpdate
<
string
[]
>
>
Type Parameters
T
extends
EntityConstructor
=
EntityConstructor
Parameters
options
:
Options
<
T
>
&
{
return
:
"guid"
;
}
Rest
...
selectors
:
Selector
[]
Returns
PubSubSubscribable
<
PubSubUpdate
<
string
[]
>
>
subscribe
Entities
<
T
>
(
options
,
...
selectors
)
:
PubSubSubscribable
<
PubSubUpdate
<
EntityInstanceType
<
T
>
[]
>
>
Type Parameters
T
extends
EntityConstructor
=
EntityConstructor
Parameters
options
:
Options
<
T
>
Rest
...
selectors
:
Selector
[]
Returns
PubSubSubscribable
<
PubSubUpdate
<
EntityInstanceType
<
T
>
[]
>
>
subscribe
Entity
subscribe
Entity
<
T
>
(
options
,
...
selectors
)
:
PubSubSubscribable
<
PubSubUpdate
<
null
|
string
>
>
Type Parameters
T
extends
EntityConstructor
=
EntityConstructor
Parameters
options
:
Options
<
T
>
&
{
return
:
"guid"
;
}
Rest
...
selectors
:
Selector
[]
Returns
PubSubSubscribable
<
PubSubUpdate
<
null
|
string
>
>
subscribe
Entity
<
T
>
(
options
,
...
selectors
)
:
PubSubSubscribable
<
PubSubUpdate
<
null
|
EntityInstanceType
<
T
>
>
>
Type Parameters
T
extends
EntityConstructor
=
EntityConstructor
Parameters
options
:
Options
<
T
>
Rest
...
selectors
:
Selector
[]
Returns
PubSubSubscribable
<
PubSubUpdate
<
null
|
EntityInstanceType
<
T
>
>
>
subscribeUID
subscribeUID
(
name
)
:
(
(
resolve
?
,
reject
?
,
count
?
)
=>
{
unsubscribe
:
(
(
)
=>
void
)
;
}
)
Parameters
name
:
string
Returns
(
(
resolve
?
,
reject
?
,
count
?
)
=>
{
unsubscribe
:
(
(
)
=>
void
)
;
}
)
(
resolve
?
,
reject
?
,
count
?
)
:
{
unsubscribe
:
(
(
)
=>
void
)
;
}
Parameters
Optional
resolve
:
PubSubResolveCallback
<
number
>
Optional
reject
:
PubSubRejectCallback
Optional
count
:
PubSubCountCallback
Returns
{
unsubscribe
:
(
(
)
=>
void
)
;
}
unsubscribe
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
subscribe
With
subscribe
With
<
T
>
(
entity
,
resolve
?
,
reject
?
,
count
?
)
:
PubSubSubscription
<
T
>
Type Parameters
T
extends
EntityInterface
Parameters
entity
:
T
Optional
resolve
:
PubSubResolveCallback
<
T
>
Optional
reject
:
PubSubRejectCallback
Optional
count
:
PubSubCountCallback
Returns
PubSubSubscription
<
T
>
update
Array
update
Array
(
current
,
update
)
:
void
Parameters
current
:
EntityInterface
[]
update
:
PubSubUpdate
<
EntityInterface
[]
>
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
authenticate
close
connect
is
Connection
is
Connection
Connecting
is
Connection
Open
off
on
subscribe
Entities
subscribe
Entity
subscribeUID
subscribe
With
update
Array
Nymph.js 1.0.0-beta.81
Loading...