refactor frontend ipc

This commit is contained in:
riqo 2021-06-19 15:22:17 -05:00
commit 56196bcbcf
13 changed files with 177 additions and 52 deletions

View file

@ -46,8 +46,8 @@ interface IpcHandlerCallback<I, O> {
(payload: I | null): Promise<Error | O>;
}
interface IpcListenerCallback<I> {
(payload: I | null): void;
interface IpcListenerCallback<T> {
(payload: T | null): void;
}
interface IIpcHandler<I, O> {
@ -67,6 +67,10 @@ interface IPCHandlers {
}
interface IPCListeners {
[listener: string]: IIpcListener<any>;
[listener: string]: IIpcListener<any> | null;
}
interface IpcEmitPayload<T> {
message: T | null;
}