Files
Folo/apps/desktop/layer/renderer/global.d.ts
T
Innei 4ae8bf21e8 chore: add Prettify helper
- Added APP_NAME constant with value "Folo" to global declarations in both desktop and SSR environments.
- Updated type definitions to use Prettify for improved type handling in context menu and component definitions.
- Enhanced the useTitle hook to incorporate APP_NAME in the title template for better context in the application.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-21 16:52:39 +08:00

26 lines
737 B
TypeScript

import type { ElectronAPI } from "@electron-toolkit/preload"
declare global {
interface Window {
electron?: ElectronAPI
api?: { canWindowBlur: boolean }
platform: NodeJS.Platform
}
export const APP_NAME = "Folo"
}
declare module "virtual:pwa-register/react" {
import type { Dispatch, SetStateAction } from "react"
import type { RegisterSWOptions } from "vite-plugin-pwa/types"
export function useRegisterSW(options?: RegisterSWOptions): {
needRefresh: [boolean, Dispatch<SetStateAction<boolean>>]
offlineReady: [boolean, Dispatch<SetStateAction<boolean>>]
updateServiceWorker: (reloadPage?: boolean) => Promise<void>
}
}
export {}
export { type RegisterSWOptions } from "vite-plugin-pwa/types"