//#region src/lib/stack-app/apps/implementations/session-refresh-subscription.d.ts type TokenStoreSubscription = { unsubscribe: () => void; }; type TokenStoreLike = { onChange: (callback: () => void) => TokenStoreSubscription; }; type SessionRefreshLike = { sessionKey: string; startRefreshingAccessToken: (minMillisUntilExpiration: number, maxMillisSinceIssued: number | null) => TokenStoreSubscription; }; /** * Keeps the currently mounted React session fresh while `useSyncExternalStore` * has an active subscriber. The token store owns which session is current; when * it changes to a different session key, we stop refreshing the old session and * start refreshing the new one. The caller still receives every token-store * change through `onTokenStoreChange` so React can re-read the session snapshot. */ declare function subscribeSessionRefresh(options: { tokenStore: TokenStoreLike; getSession: () => SessionRefreshLike; onTokenStoreChange: () => void; minMillisUntilExpiration?: number; maxMillisSinceIssued?: number | null; }): () => void; //#endregion export { subscribeSessionRefresh }; //# sourceMappingURL=session-refresh-subscription.d.ts.map