|
1 | 1 | import { ElectronAPI } from '@electron-toolkit/preload' |
2 | | -import type { AppState } from '../main/state' |
| 2 | +import type { MainAPI } from './index' |
3 | 3 |
|
4 | 4 | declare global { |
5 | 5 | interface Window { |
6 | 6 | electron: ElectronAPI |
7 | | - api: { |
8 | | - getAppSettings: () => AppSettings |
9 | | - updateAppSettings: (settings: Partial<AppSettings>) => void |
10 | | - updateAppState: (state: Partial<AppState>) => void |
11 | | - onSyncAppSettings: (callback: (settings: AppSettings) => void) => void |
12 | | - removeSyncAppSettingsListener: () => void |
13 | | - onSyncAppState: (callback: (state: AppState) => void) => void |
14 | | - removeSyncAppStateListener: () => void |
15 | | - initShortcuts: (shortcuts: Record<string, { action: string; key: string }>) => Promise<void> |
16 | | - getShortcuts: () => Promise<Record<string, { action: string; status: string }>> |
17 | | - updateShortcuts: (shortcuts: { action: string; key: string }[]) => Promise<void> |
18 | | - onScreenshotTaken: (callback: (screenshotData: string) => void) => void |
19 | | - removeScreenshotListener: () => void |
20 | | - onSolutionChunk: (callback: (chunk: string) => void) => void |
21 | | - removeSolutionChunkListener: () => void |
22 | | - stopSolutionStream: () => Promise<boolean> |
23 | | - onSolutionComplete: (callback: () => void) => void |
24 | | - removeSolutionCompleteListener: () => void |
25 | | - onSolutionStopped: (callback: () => void) => void |
26 | | - removeSolutionStoppedListener: () => void |
27 | | - onSolutionError: (callback: (message: string) => void) => void |
28 | | - removeSolutionErrorListener: () => void |
29 | | - onScrollPageUp: (callback: () => void) => void |
30 | | - removeScrollPageUpListener: () => void |
31 | | - onScrollPageDown: (callback: () => void) => void |
32 | | - removeScrollPageDownListener: () => void |
33 | | - } |
| 7 | + api: MainAPI |
34 | 8 | } |
35 | 9 | } |
0 commit comments