40 lines
909 B
TypeScript
40 lines
909 B
TypeScript
/// <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
|
|
}
|