Skip to main content

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
NameType
aR
bR
Returns

boolean


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