Files
bs-manager/src/renderer/preload.d.ts
T
2024-12-12 08:44:09 +08:00

26 lines
776 B
TypeScript

import { webUtils } from "electron";
declare global {
interface Window {
electron: {
platform: "win32" | "linux",
ipcRenderer: {
sendMessage(channel: string, args: any): void;
on(channel: string, func: (...args: any) => void): (() => void) | undefined;
once(channel: string, func: (...args: any) => void): void;
removeAllListeners(channel: string): void;
};
path: {
sep: "/"|"\\";
basename: (path: string) => string;
join: (...args: string[]) => string;
};
webUtils: {
getPathForFile: typeof webUtils.getPathForFile;
};
};
}
}
export {};