mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 21:20:08 +00:00
fix: remove pwa deps
This commit is contained in:
27
src/vite-env.d.ts
vendored
27
src/vite-env.d.ts
vendored
@@ -1,27 +0,0 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module "virtual:pwa-register/react" {
|
||||
import type { Dispatch, SetStateAction } from "react";
|
||||
|
||||
export interface RegisterSWOptions {
|
||||
immediate?: boolean;
|
||||
onNeedRefresh?: () => void;
|
||||
onOfflineReady?: () => void;
|
||||
onRegistered?: (
|
||||
registration: ServiceWorkerRegistration | undefined,
|
||||
) => void;
|
||||
onRegisteredSW?: (
|
||||
swScriptUrl: string,
|
||||
registration: ServiceWorkerRegistration | undefined,
|
||||
) => void;
|
||||
onRegisterError?: (error) => void;
|
||||
}
|
||||
|
||||
export interface RegisterSWHook {
|
||||
needRefresh: [boolean, Dispatch<SetStateAction<boolean>>];
|
||||
offlineReady: [boolean, Dispatch<SetStateAction<boolean>>];
|
||||
updateServiceWorker: (reloadPage?: boolean) => Promise<void>;
|
||||
}
|
||||
|
||||
export function useRegisterSW(options?: RegisterSWOptions): RegisterSWHook;
|
||||
}
|
||||
Reference in New Issue
Block a user