fix: fix some typescript issues with pwa

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-08-11 12:22:02 +02:00
parent 04c5ac1163
commit e351d3cb2f
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
2 changed files with 4 additions and 2 deletions

View file

@ -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();

View file

@ -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/*"]