Files
shakespeare/electron/electron.d.ts
T
2025-10-23 10:43:44 -05:00

35 lines
778 B
TypeScript

/**
* TypeScript definitions for the Electron API exposed to the renderer process.
*
* Add this to your tsconfig.json include array to use these types:
* "include": ["src", "electron/electron.d.ts"]
*/
interface ElectronAPI {
/**
* Flag indicating the app is running in Electron.
* Always `true` when running in Electron.
*/
isElectron: boolean;
/**
* Get the current platform.
* @returns 'darwin' | 'win32' | 'linux'
*/
platform(): Promise<string>;
/**
* Get the application version from package.json.
* @returns Version string (e.g., "1.0.0")
*/
version(): Promise<string>;
}
interface Window {
/**
* Electron API exposed via preload script.
* Only available when running in Electron.
*/
electron?: ElectronAPI;
}