hyper/app/extend-electron.d.ts
Labhansh Agrawal 4543f1c32a fix ts errors
2020-09-16 18:37:16 +02:00

22 lines
646 B
TypeScript

import type {Server} from './rpc';
declare module 'electron' {
interface App {
config: typeof import('./config');
plugins: typeof import('./plugins');
getWindows: () => Set<BrowserWindow>;
getLastFocusedWindow: () => BrowserWindow | null;
windowCallback?: (win: BrowserWindow) => void;
createWindow: (fn?: (win: BrowserWindow) => void, options?: Record<string, any>) => BrowserWindow;
setVersion: (version: string) => void;
}
// type Server = import('./rpc').Server;
interface BrowserWindow {
uid: string;
sessions: Map<any, any>;
focusTime: number;
clean: () => void;
rpc: Server;
}
}