delete obsolte src/lib/pwa-register.d.ts

vite-plugin-pwa provides it's own typings so I added them to tsconfig
This commit is contained in:
jakub791 2023-05-04 19:43:39 +02:00
parent 2e449f2b78
commit 05c56640fe
3 changed files with 2 additions and 19 deletions

View file

@ -1,17 +0,0 @@
declare module 'virtual:pwa-register/vue' {
import type { Ref } from 'vue'
export interface RegisterSWOptions {
immediate?: boolean
onNeedRefresh?: () => void
onOfflineReady?: () => void
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
onRegisterError?: (error: any) => void
}
export function useRegisterSW(options?: RegisterSWOptions): {
needRefresh: Ref<boolean>
offlineReady: Ref<boolean>
updateServiceWorker: (reloadPage?: boolean) => Promise<void>
}
}

View file

@ -16,7 +16,7 @@
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"sourceMap": true, "sourceMap": true,
"baseUrl": "src", "baseUrl": "src",
"types": ["vite/client"], "types": ["vite/client", "vite-plugin-pwa/vue"],
"lib": ["esnext", "dom", "dom.iterable", "scripthost"] "lib": ["esnext", "dom", "dom.iterable", "scripthost"]
}, },
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"], "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],

View file

@ -33,7 +33,7 @@ export default defineConfig({
VitePWA({ VitePWA({
includeAssets: ["Logo.svg", "favicon.ico", "robots.txt", "apple-touch-icon.png"], includeAssets: ["Logo.svg", "favicon.ico", "robots.txt", "apple-touch-icon.png"],
workbox: { workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}'] globPatterns: ["**/*.{js,css,html,ico,png,svg}"]
}, },
manifest: { manifest: {
name: projInfo.title, name: projInfo.title,