typedef: add ipc.removeListener

This commit is contained in:
CanadaHonk 2023-01-06 22:09:05 +00:00
parent 11b088327c
commit bdc0e29e73

11
gluon.d.ts vendored
View File

@ -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)