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