-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
27 lines (24 loc) · 848 Bytes
/
index.d.ts
File metadata and controls
27 lines (24 loc) · 848 Bytes
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
26
27
import { ElectronAPI } from '@electron-toolkit/preload';
declare global {
type ElectronListener = (event: any, ...args: any[]) => void;
interface IpcBridge {
readonly versions: Readonly<NodeJS.ProcessVersions>;
readonly channels: Array<string>;
/**
* IPC functions.
*/
readonly ipc: {
on: (channel: string, listener: ElectronListener) => void;
once: (channel: string, listener: ElectronListener) => void;
off: (channel: string, listener: ElectronListener) => void;
removeAllListeners: (channel: string) => void;
send: (channel: string, ...args: any[]) => void;
invoke: (channel: string, ...args: any[]) => Promise<any>;
emit: (channel: string, ...args: any[]) => Promise<void>;
};
}
interface Window {
electron: ElectronAPI;
ipc: Readonly<IpcBridge>;
}
}