interface PWAState { /** Whether the app can be installed */ canInstall: boolean; /** Whether the app is already installed */ isInstalled: boolean; /** Whether the app is running in standalone mode (installed PWA) */ isStandalone: boolean; /** Whether the service worker is registered */ isServiceWorkerReady: boolean; /** Whether there's a new version available */ hasUpdate: boolean; } interface UsePWAReturn extends PWAState { /** Trigger the install prompt */ install: () => Promise; /** Update the service worker */ update: () => void; /** Dismiss the install prompt */ dismissInstall: () => void; } interface UsePWAOptions { /** * Auto-activate a waiting service worker and reload the page so users * always run the latest deployed code. Defaults to true. */ autoUpdate?: boolean; /** * How often (ms) to poll the SW registration for an updated worker. * Defaults to 60_000 (1 minute). Set to 0 to disable polling. */ updateCheckIntervalMs?: number; } /** * usePWA Hook * * Manages PWA installation state and service worker updates. * * @example * ```tsx * function InstallBanner() { * const { canInstall, isInstalled, install, dismissInstall } = usePWA(); * * if (!canInstall || isInstalled) return null; * * return ( *
*

Install for a better experience!

* * *
* ); * } * ``` */ export declare function usePWA(options?: UsePWAOptions): UsePWAReturn; export {}; //# sourceMappingURL=usePWA.d.ts.map