fix: type error

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-08-22 20:37:54 +08:00
parent 9b2656ec53
commit 97779a0daa
3 changed files with 13 additions and 3 deletions
+9 -1
View File
@@ -1,5 +1,13 @@
import type { ElectronAPI } from "@electron-toolkit/preload"
import { env } from "@env"
declare const globalThis: {
window: Window & {
electron?: ElectronAPI
api?: { canWindowBlur: boolean }
}
}
export const APP_PROTOCOL = import.meta.env.DEV ? "follow-dev" : "follow"
export const DEEPLINK_SCHEME = `${APP_PROTOCOL}://`
@@ -7,5 +15,5 @@ export const DEEPLINK_SCHEME = `${APP_PROTOCOL}://`
export const WEB_URL = env.VITE_WEB_URL
export const SYSTEM_CAN_UNDER_BLUR_WINDOW = globalThis?.window?.electron ?
window.api?.canWindowBlur :
globalThis?.window.api?.canWindowBlur :
false
+2 -1
View File
@@ -7,7 +7,8 @@
"types/**/*.d.ts",
"src/shared/src/**/*",
"src/env.ts",
"./src/hono.ts"
"./src/hono.ts",
"src/shared/src/global.d.ts"
],
"compilerOptions": {
"composite": true,
+2 -1
View File
@@ -8,7 +8,8 @@
"src/shared/src/**/*",
"types/**/*.d.ts",
"src/env.ts",
"src/hono.ts"
"src/hono.ts",
"src/shared/src/global.d.ts"
],
"compilerOptions": {
"composite": true,