27 lines
462 B
TypeScript
27 lines
462 B
TypeScript
declare const enum IpcChannel {
|
|
NHENTAI_SAVE_FAVORITES = 'NHENTAI_SAVE_FAVORITES',
|
|
}
|
|
|
|
type IpcPayload = {
|
|
id: string;
|
|
data: unknown;
|
|
};
|
|
|
|
type IpcResponse = {
|
|
id: string;
|
|
success: boolean;
|
|
data?: unknown;
|
|
// just the error message
|
|
error?: string;
|
|
};
|
|
|
|
type IpcClient = {
|
|
ask: (channel: IpcChannel, data?: unknown) => Promise<unknown>;
|
|
};
|
|
|
|
type IpcHandler = (data?: unknown) => Promise<unknown>;
|
|
|
|
type IpcController = {
|
|
get(): IpcController;
|
|
};
|