2021-11-23 02:03:45 +00:00
|
|
|
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:03:45 +00:00
|
|
|
|
2021-11-23 02:05:07 +00:00
|
|
|
export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>;
|
2021-11-23 02:03:45 +00:00
|
|
|
}
|