import { PwaUpdateOptions } from './types.js'; declare class PwaUpdateServiceImpl { private _listeners; private _options; private _registration?; private _waitingWorker?; private _active; private _applying; private _reloading; private _hadController; /** * Start watching the service-worker registration. Idempotent and SSR-safe; * a no-op when the browser has no service-worker support or the app ships * none. Called from `startInit` with defaults — an app that wants custom * options calls `activate(options)` **before** `startInit()` (the first * call wins, later calls are ignored). */ activate(options?: PwaUpdateOptions): void; /** True when a new version is installed and waiting to take over. */ get updateAvailable(): boolean; /** True between `applyUpdate()` and the reload it triggers. */ get applying(): boolean; /** * Ask the browser to check for a new service worker now. Cheap and safe to * call at any time; failures (offline, transient network) are swallowed — * the next trigger simply tries again. */ checkForUpdate(): Promise; /** * Activate the waiting worker and reload once it has taken over. Returns * `false` when there is nothing to apply (or an apply is already running). * * The reload happens on `controllerchange`, not here — so it also fires * exactly once when another tab of the same app applies the update. */ applyUpdate(): boolean; /** * Subscribe to update-state changes (update found, apply started). * @returns Unsubscribe function. */ subscribe(callback: () => void): () => void; private _attach; private _handleUpdateFound; private _handleControllerChange; private _handleVisibilityChange; private _notifyListeners; } /** Singleton instance of the PWA update service. */ export declare const pwaUpdateService: PwaUpdateServiceImpl; export {}; //# sourceMappingURL=PwaUpdateService.d.ts.map