@@ -4,19 +4,19 @@ import { ipcRenderer, contextBridge } from 'electron'
4
4
contextBridge . exposeInMainWorld ( 'ipcRenderer' , {
5
5
on ( ...args : Parameters < typeof ipcRenderer . on > ) {
6
6
const [ channel , listener ] = args
7
- ipcRenderer . on ( channel , ( event , ...args ) => listener ( event , ...args ) )
7
+ return ipcRenderer . on ( channel , ( event , ...args ) => listener ( event , ...args ) )
8
8
} ,
9
9
off ( ...args : Parameters < typeof ipcRenderer . off > ) {
10
10
const [ channel , ...omit ] = args
11
- ipcRenderer . off ( channel , ...omit )
11
+ return ipcRenderer . off ( channel , ...omit )
12
12
} ,
13
13
send ( ...args : Parameters < typeof ipcRenderer . send > ) {
14
14
const [ channel , ...omit ] = args
15
- ipcRenderer . send ( channel , ...omit )
15
+ return ipcRenderer . send ( channel , ...omit )
16
16
} ,
17
17
invoke ( ...args : Parameters < typeof ipcRenderer . invoke > ) {
18
18
const [ channel , ...omit ] = args
19
- ipcRenderer . invoke ( channel , ...omit )
19
+ return ipcRenderer . invoke ( channel , ...omit )
20
20
} ,
21
21
22
22
// You can expose other APTs you need here.
0 commit comments