import type RawIPC = require("node-ipc");
|
|
|
|
/**
|
|
* The IPC request structure
|
|
*/
|
|
export interface IIpcRequest {
|
|
id: number|null,
|
|
data ?: any
|
|
}
|
|
|
|
/**
|
|
* The IPC response structure
|
|
*/
|
|
export interface IIpcResponse {
|
|
data ?: any,
|
|
error?: string | Error
|
|
}
|
|
|
|
/**
|
|
* The IPC message handler type
|
|
*/
|
|
export type IpcMessageHandler = (...args: any[]) => Promise<any>
|
|
|
|
/**
|
|
* HOLY @#$@% WHOEVER MADE THE TYPES FOR `node-ipc` SHOULDB BE HANGED
|
|
*/
|
|
export type IPC = InstanceType<(typeof RawIPC)["IPC"]>;
|