astro/examples/with-vite-plugin-pwa/src/vite-env.d.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
387 B
TypeScript
Raw Normal View History

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