Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Aug 22, 2024
1 parent 9b2656e commit 97779a0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/shared/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
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}://`

// export const WEB_URL = import.meta.env.VITE_VERCEL_URL ?? import.meta.env.VITE_WEB_URL
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
3 changes: 2 additions & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 97779a0

Please sign in to comment.