import type EventEmitter from 'events'; export type IpcClient = { on: EventEmitter['on']; emit: (name: string, data: unknown) => void; }; type FileDialogOptions = { properties?: Array<'openFile' | 'openDirectory'>; filters?: { name: string; extensions: string[]; }[]; }; type Actual = { IS_DEV: boolean; ACTUAL_VERSION: string; openURLInBrowser: (url: string) => void; openInFileManager: (filepath: string) => void; saveFile: ( contents: string | Buffer, filename: string, dialogTitle?: string, ) => Promise; openFileDialog: (options: FileDialogOptions) => Promise; relaunch: () => void; reload: (() => Promise) | undefined; restartElectronServer: () => void; moveBudgetDirectory: ( currentBudgetDirectory: string, newDirectory: string, ) => Promise; applyAppUpdate: () => Promise; ipcConnect: (callback: (client: IpcClient) => void) => void; getServerSocket: () => Promise; setTheme: (theme: string) => void; logToTerminal: (...args: unknown[]) => void; onEventFromMain: ( event: string, listener: (...args: unknown[]) => void, ) => void; isUpdateReadyForDownload: () => boolean; waitForUpdateReadyForDownload: () => Promise; startSyncServer: () => Promise; stopSyncServer: () => Promise; isSyncServerRunning: () => Promise; startOAuthServer: () => Promise; }; declare global { var Actual: Actual; // oxlint-disable-next-line typescript/consistent-type-definitions -- global Window augmentation requires interface interface Window { Actual: Actual; } var IS_TESTING: boolean; var currentMonth: string | null; }