Skip to main content

Interface: RefCountedAsyncSubscriptionOptions

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

Options for createRefCountedAsyncSubscription.

Propertiesโ€‹

onCleanupError()?โ€‹

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

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

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:35

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:40

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:45

Optional diagnostic hook called when the first subscriber triggers setup.

Returnsโ€‹

void


start()โ€‹

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

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

Starts the underlying subscription.

Returnsโ€‹

Promise<() => void>

A cleanup function.