-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathglobal.d.ts
25 lines (23 loc) · 1.12 KB
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import type { ClamDaemon } from './packages/main/libs/ClamDaemon'
import type { ClamScan } from './packages/main/libs/ClamScan'
import type { FreshClam } from './packages/main/libs/FreshClam'
import type { IpcRenderer, IpcRendererEvent } from 'electron'
declare global {
type IpcRendererListenerCallback<Args extends any[]> = (event: IpcRendererEvent, ...args: Args) => void
interface Window {
electronApi: {
isFreshClamRunning: FreshClam['isRunning']
listenToClamDaemonOutput: (callback: IpcRendererListenerCallback<[string]>) => IpcRenderer
listenToClamDaemonStatus: (callback: IpcRendererListenerCallback<[boolean]>) => IpcRenderer
listenToClamScanOutput: (callback: IpcRendererListenerCallback<[string]>) => IpcRenderer
listenToClamScanStatus: (callback: IpcRendererListenerCallback<[boolean]>) => IpcRenderer
runFreshClam: FreshClam['run']
startClamDaemon: ClamDaemon['start']
startClamScan: ClamScan['start']
stopClamDaemon: ClamDaemon['stop']
stopClamScan: ClamScan['stop']
watchClamDaemon: ClamDaemon['watch']
watchClamScan: ClamScan['watch']
}
}
}