12 lines
393 B
TypeScript
12 lines
393 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>
|
||
|
}
|