electron/spec-main/ambient.d.ts
Samuel Attard 0d2e967960
feat: expose electron/{process} typed modules (#22937)
* feat: expose electron/{process} typed modules

* chore: update imports for common modules

* chore: update typescript generator

* chore: remap electron/* to the internal packages
2020-04-06 17:04:09 -07:00

40 lines
896 B
TypeScript

declare let standardScheme: string;
declare namespace Electron {
interface Menu {
_executeCommand(event: any, id: number): void;
_menuWillShow(): void;
getAcceleratorTextAt(index: number): string;
}
interface MenuItem {
getDefaultRoleAccelerator(): Accelerator | undefined;
}
interface WebContents {
getOwnerBrowserWindow(): BrowserWindow;
getWebPreferences(): any;
}
interface Session {
destroy(): void;
}
// Experimental views API
class TopLevelWindow {
constructor(args: {show: boolean})
setContentView(view: View): void
}
class View {}
class WebContentsView {
constructor(webContents: WebContents)
}
namespace Main {
class TopLevelWindow extends Electron.TopLevelWindow {}
class View extends Electron.View {}
class WebContentsView extends Electron.WebContentsView {}
}
}
declare module 'dbus-native';