Interface: SubscribeOptions<R>
The options passed to subscribe.
Type parameters
Name | Type |
---|---|
R | extends ReadonlyJSONValue | undefined |
Properties
onData
• onData: (result
: R
) => void
Type declaration
▸ (result
): void
Called when the return value of the body function changes.
Parameters
Name | Type |
---|---|
result | R |
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
Name | Type |
---|---|
error | unknown |
Returns
void