Subscription
A Subscription object is returned to the caller when a subscription is created. It allows the caller to attach event listeners to the subscription to get updates when the PODs change.
It also allows the caller to run the query immediately, which is useful on first creating the subscription, before any updates are available.
Type Parameters
• E extends EntriesSchema
Constructors
new Subscription()
new Subscription<
E
>(query
,emitter
,api
):Subscription
<E
>
Parameters
• query: PodSpec
<E
>
• emitter: Emitter
<SubscriptionEvents
>
• api: ParcnetPODCollectionWrapper
Returns
Subscription
<E
>
Defined in
packages/app-connector/src/api_wrapper.ts:37
Methods
on()
on(
event
,callback
): () =>void
Parameters
• event: "update"
• callback
Returns
Function
Returns
void
Defined in
packages/app-connector/src/api_wrapper.ts:51
query()
query():
Promise
<PODData
[]>
Returns
Promise
<PODData
[]>