Skip to main content

Interface: SubscribeOptions<R>

The options passed to subscribe.

Type parameters​

NameType
Rextends ReadonlyJSONValue | undefined

Properties​

onData​

• onData: (result: R) => void

Type declaration​

▸ (result): void

Called when the return value of the body function changes.

Parameters​
NameType
resultR
Returns​

void


onDone​

• Optional onDone: () => void

Type declaration​

▸ (): void

If present, called when the subscription is removed/done.

Returns​

void


onError​

• Optional onError: (error: unknown) => void

Type declaration​

▸ (error): void

If present, called when an error occurs.

Parameters​
NameType
errorunknown
Returns​

void