From bdc0e29e733d000990e08e5a7816a18707fb3761 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Fri, 6 Jan 2023 22:09:05 +0000 Subject: [PATCH] typedef: add ipc.removeListener --- gluon.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gluon.d.ts b/gluon.d.ts index 4c46d8f..e16f110 100644 --- a/gluon.d.ts +++ b/gluon.d.ts @@ -42,6 +42,17 @@ type IPCApi = { callback: (data: any) => any ): void, + /** + * Unsubscribe an IPC event listener callback with a specific type. + */ + removeListener( + /** Type of event which was subscribed to. */ + type: string, + + /** Callback function to unsubscribe. */ + callback: Function + ), + /** * Expose a Node function to the web context, acts as a wrapper around IPC events. * Can be ran in window with Gluon.ipc[key](...args)