Interface: RefCountedAsyncSubscriptionOptions
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:26
Options for createRefCountedAsyncSubscription.
Propertiesโ
maxSetupAttempts?โ
readonly optional maxSetupAttempts?: number;
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:28
Maximum setup attempts while at least one subscriber remains.
onCleanupError?โ
readonly optional onCleanupError?: (error: Error) => void;
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:33
Optional error handler invoked if the cleanup handler throws.
Parametersโ
errorโ
Returnsโ
void
onReady?โ
readonly optional onReady?: () => void;
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:39
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:44
Optional error handler invoked if subscription setup fails.
Parametersโ
errorโ
Returnsโ
void
onStarted?โ
readonly optional onStarted?: () => void;
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:49
Optional diagnostic hook called when the first subscriber triggers setup.
Returnsโ
void
retryDelayMs?โ
readonly optional retryDelayMs?: number;
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:52
Delay between setup attempts in milliseconds.
startโ
readonly start: () => Promise<() => void>;
Defined in: src/stores/utils/refCountedAsyncSubscription.ts:59
Starts the underlying subscription.
Returnsโ
Promise<() => void>
A cleanup function.