summaryrefslogtreecommitdiff
path: root/examples/with-vite-plugin-pwa/src/vite-env.d.ts
blob: 1a947fad0073810e6726ce82715be6d796001bf4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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>;
}