Interface: SubscribeOptions<R>
The options passed to subscribe.
Type parameters
Name |
---|
R |
Properties
isEqual
• Optional
isEqual: (a
: R
, b
: R
) => boolean
Type declaration
▸ (a
, b
): boolean
If present this function is used to determine if the value returned by the body function has changed. If not provided a JSON deep equality check is used.
Parameters
Name | Type |
---|---|
a | R |
b | R |
Returns
boolean
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