2022-11-12 02:09:28 +05:30
|
|
|
import { IpcRenderer } from "electron";
|
|
|
|
|
|
|
|
export interface IElectronAPI {
|
|
|
|
on: (command, func?) => IpcRenderer;
|
2024-10-04 14:45:54 +05:30
|
|
|
off: (command, func?) => IpcRenderer;
|
2023-11-22 21:24:02 +05:30
|
|
|
send: <T>(command, func?: T) => IpcRenderer;
|
2022-11-12 02:09:28 +05:30
|
|
|
invoke: (command, func?) => any;
|
2023-08-30 10:24:16 +05:30
|
|
|
platform: "mac" | "win" | "linux";
|
2022-11-12 02:09:28 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
electron: IElectronAPI;
|
|
|
|
}
|
|
|
|
}
|