diff --git a/js/src/App.vue b/js/src/App.vue index 108981bb..0ab57378 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -178,7 +178,9 @@ onMounted(() => { cancelText: t("Ignore"), message: t("A new version is available."), onAction: async () => { - const registration = event.detail as ServiceWorkerRegistration; + const registration = ( + event as unknown as { detail: ServiceWorkerRegistration } + ).detail; try { await refreshApp(registration); window.location.reload(); diff --git a/js/tsconfig.json b/js/tsconfig.json index a8f27a55..a8bb8cbe 100644 --- a/js/tsconfig.json +++ b/js/tsconfig.json @@ -14,7 +14,7 @@ "isolatedModules": true, "sourceMap": true, "baseUrl": ".", - "types": ["webpack-env", "jest", "vite/client"], + "types": ["webpack-env", "jest", "vite/client", "vite-plugin-pwa/vue"], "typeRoots": ["./@types", "./node_modules/@types"], "paths": { "@/*": ["src/*"]