aboutsummaryrefslogtreecommitdiff
path: root/src/VencordNative.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-08-31 20:47:07 +0200
committerVendicated <vendicated@riseup.net>2022-08-31 20:47:07 +0200
commita7ccbcfca4f181790b86199a7f31d1ae19e0253f (patch)
tree56be6cef5437dff886dcefa04f930780d552c68c /src/VencordNative.ts
parent98cb301df53305f397ac6e1b4e603c930820f228 (diff)
downloadVencord-a7ccbcfca4f181790b86199a7f31d1ae19e0253f.tar.gz
Vencord-a7ccbcfca4f181790b86199a7f31d1ae19e0253f.tar.bz2
Vencord-a7ccbcfca4f181790b86199a7f31d1ae19e0253f.zip
Refactor webpack; Add ErrorBoundary
Diffstat (limited to 'src/VencordNative.ts')
-rw-r--r--src/VencordNative.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/VencordNative.ts b/src/VencordNative.ts
index fc1e690..755c471 100644
--- a/src/VencordNative.ts
+++ b/src/VencordNative.ts
@@ -8,7 +8,7 @@ export default {
if (event in IPC_EVENTS) ipcRenderer.send(event, ...args);
else throw new Error(`Event ${event} not allowed.`);
},
- sendSync(event: string, ...args: any[]) {
+ sendSync<T = any>(event: string, ...args: any[]): T {
if (event in IPC_EVENTS) return ipcRenderer.sendSync(event, ...args);
else throw new Error(`Event ${event} not allowed.`);
},
@@ -16,7 +16,7 @@ export default {
if (event in IPC_EVENTS) ipcRenderer.on(event, listener);
else throw new Error(`Event ${event} not allowed.`);
},
- invoke(event: string, ...args: any[]) {
+ invoke<T = any>(event: string, ...args: any[]): Promise<T> {
if (event in IPC_EVENTS) return ipcRenderer.invoke(event, ...args);
else throw new Error(`Event ${event} not allowed.`);
}