hyper/typings/extend-electron.d.ts

30 lines
827 B
TypeScript
Raw Normal View History

2023-07-25 01:39:51 -08:00
import type {Server} from '../app/rpc';
2022-01-31 10:29:58 -09:00
declare global {
namespace Electron {
interface App {
2023-07-25 01:39:51 -08:00
config: typeof import('../app/config');
plugins: typeof import('../app/plugins');
2022-01-31 10:29:58 -09:00
getWindows: () => Set<BrowserWindow>;
getLastFocusedWindow: () => BrowserWindow | null;
windowCallback?: (win: BrowserWindow) => void;
createWindow: (
fn?: (win: BrowserWindow) => void,
2023-06-30 11:07:04 -08:00
options?: {size?: [number, number]; position?: [number, number]},
profileName?: string
2022-01-31 10:29:58 -09:00
) => BrowserWindow;
setVersion: (version: string) => void;
}
2022-01-31 10:29:58 -09:00
// type Server = import('./rpc').Server;
interface BrowserWindow {
uid: string;
sessions: Map<any, any>;
focusTime: number;
clean: () => void;
rpc: Server;
2023-06-30 11:07:04 -08:00
profileName: string;
2022-01-31 10:29:58 -09:00
}
}
}