/** * Lazy initialization config for subscription handlers. */ interface SubscriptionHandlerConfig { /** * Callback executed when a subscription is added. * @param isFirstSubscription - Whether this is the first subscription * @param shouldThrottle - Whether to throttle the fetch */ onSubscribe: (isFirstSubscription: boolean, shouldThrottle: boolean) => void; /** Callback executed when the last remaining subscription is removed. */ onLastUnsubscribe: (willResubscribe?: boolean) => void; } /** * Manages subscription state and lifecycle events for a `createQueryStore` instance. */ export declare class SubscriptionManager { private count; private lastSubscriptionTime; private readonly fetchThrottleMs; private onSubscribe; private onLastUnsubscribe; /** * Creates a new SubscriptionManager instance. */ constructor(disableAutoRefetching: boolean); /** * Initializes subscription event handlers. */ init({ onSubscribe, onLastUnsubscribe }: SubscriptionHandlerConfig): void; hasSubscribers(): boolean; /** * Adds a new subscription and triggers relevant lifecycle callbacks. * @returns A cleanup function that removes the subscription when called */ subscribe(): (skipAbortFetch?: boolean) => void; } export {}; //# sourceMappingURL=SubscriptionManager.d.ts.map