TypeScript · 991 bytes Raw Blame History
1 /// <reference types="vite/client" />
2
3 declare module '*.vue' {
4 import type { DefineComponent } from 'vue'
5 const component: DefineComponent<{}, {}, any>
6 export default component
7 }
8
9 declare module 'virtual:pwa-register' {
10 export interface RegisterSWOptions {
11 immediate?: boolean
12 onNeedRefresh?: () => void
13 onOfflineReady?: () => void
14 onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
15 onRegisterError?: (error: any) => void
16 }
17
18 export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>
19 }
20
21 // Global notification interface
22 declare global {
23 interface Window {
24 $notify: {
25 success: (message: string, title?: string, duration?: number) => void
26 error: (message: string, title?: string, duration?: number) => void
27 warning: (message: string, title?: string, duration?: number) => void
28 info: (message: string, title?: string, duration?: number) => void
29 }
30 }
31 }
32
33 export {}