Skip to main content

Interface: RefCountedAsyncSubscriptionOptions

Defined in: src/stores/utils/refCountedAsyncSubscription.ts:26

Options for createRefCountedAsyncSubscription.

Propertiesโ€‹

onCleanupError?โ€‹

readonly optional onCleanupError?: (error: Error) => void

Defined in: src/stores/utils/refCountedAsyncSubscription.ts:30

Optional error handler invoked if the cleanup handler throws.

Parametersโ€‹

errorโ€‹

Error

Returnsโ€‹

void


onReady?โ€‹

readonly optional onReady?: () => void

Defined in: src/stores/utils/refCountedAsyncSubscription.ts:36

Optional diagnostic hook called when the underlying subscription is ready.

Returnsโ€‹

void


onSetupError?โ€‹

readonly optional onSetupError?: (error: Error) => void

Defined in: src/stores/utils/refCountedAsyncSubscription.ts:41

Optional error handler invoked if subscription setup fails.

Parametersโ€‹

errorโ€‹

Error

Returnsโ€‹

void


onStarted?โ€‹

readonly optional onStarted?: () => void

Defined in: src/stores/utils/refCountedAsyncSubscription.ts:46

Optional diagnostic hook called when the first subscriber triggers setup.

Returnsโ€‹

void


startโ€‹

readonly start: () => Promise<() => void>

Defined in: src/stores/utils/refCountedAsyncSubscription.ts:53

Starts the underlying subscription.

Returnsโ€‹

Promise<() => void>

A cleanup function.