pwa
This commit is contained in:
40
client/src/vite-env.d.ts
vendored
Normal file
40
client/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module 'virtual:pwa-register' {
|
||||
export interface 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>
|
||||
}
|
||||
|
||||
declare module 'virtual:pwa-info' {
|
||||
export interface PWAInfo {
|
||||
webManifest: {
|
||||
linkTag: string
|
||||
}
|
||||
}
|
||||
|
||||
export const pwaInfo: PWAInfo | undefined
|
||||
}
|
||||
|
||||
declare module 'virtual:pwa-assets/head' {
|
||||
export interface PWAAssetsHead {
|
||||
themeColor?: {
|
||||
content: string
|
||||
}
|
||||
links: Array<{
|
||||
rel: string
|
||||
href: string
|
||||
sizes?: string
|
||||
type?: string
|
||||
[key: string]: any
|
||||
}>
|
||||
}
|
||||
|
||||
export const pwaAssetsHead: PWAAssetsHead
|
||||
}
|
||||
Reference in New Issue
Block a user