Skip to content

Commit

Permalink
fix(typescript): fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Asuka authored and ysfscream committed Dec 18, 2024
1 parent e9f48f6 commit 48e6661
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { electronAPI } from '@electron-toolkit/preload'
import { contextBridge, ipcRenderer } from 'electron'

// Custom APIs for renderer
const api = {
const api: Window['api'] = {
execute: (...args) => ipcRenderer.invoke('db:execute', ...args),
onUpdateStatus: callback => ipcRenderer.on('update-status', (event, status, data) => {
callback(event, { status, data })
Expand Down
7 changes: 5 additions & 2 deletions apps/desktop/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"include": [
"electron.vite.config.*",
"src/main/**/*",
"src/preload/**/*",
"src/database/db.main.ts"
"src/database/**/*"
],
"exclude": [
"src/database/db.renderer.ts",
"src/database/services/**/*"
]
}
3 changes: 2 additions & 1 deletion apps/desktop/tsconfig.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"src/database/**/*",
"./typed-router.d.ts",
"src/renderer/auto-imports.d.ts",
"src/renderer/components.d.ts"
"src/renderer/components.d.ts",
"../../packages/ui/src/**/*"
]
}
3 changes: 2 additions & 1 deletion apps/web/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"./typed-router.d.ts",
"./auto-imports.d.ts",
"./components.d.ts",
"../desktop/src/preload/index.d.ts"
"../desktop/src/preload/index.d.ts",
"../../packages/ui/src/**/*"
],
"exclude": ["src/**/__tests__/*"]
}

0 comments on commit 48e6661

Please sign in to comment.