astro/examples/with-vite-plugin-pwa/src/vite-env.d.ts
2021-12-22 16:11:05 -05:00

11 lines
387 B
TypeScript

declare module 'virtual:pwa-register' {
export type RegisterSWOptions = {
immediate?: boolean;
onNeedRefresh?: () => void;
onOfflineReady?: () => void;
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void;
onRegisterError?: (error: any) => void;
};
export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>;
}