-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
28 lines (23 loc) · 963 Bytes
/
index.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
26
27
28
interface BasePromiseIPC {
send: (route:string, sender:any, ...dataArgs: any) => Promise<any>,
on: (route:string, listener: (...dataArgs: any) => Promise<any>) => BasePromiseIPC,
watch: (route:string, listener: (...dataArgs: any, replyChannel?: string) => Promise<any>) => () => void,
}
interface RendererPromiseIPC extends BasePromiseIPC {
send: (route:string, ...dataArgs: []) => Promise<any>,
sendTo: (route:string, winID:string, ...dataArgs: any) => Promise<any>,
PromiseIpc?:RendererPromiseIPC,
PromiseIpcRenderer?:RendererPromiseIPC,
}
interface MainPromiseIPC extends BasePromiseIPC {
send: (route:string, webContents:any, ...dataArgs: any) => Promise<any>,
PromiseIpc?:RendererPromiseIPC,
PromiseIpcMain?:RendererPromiseIPC,
}
interface PromiseIPC {
ACTIONS?: any,
}
declare module '@2o3t/electron-ipc-promise' {
const content: RendererPromiseIPC & MainPromiseIPC & PromiseIPC;
export = content;
}