forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub-electron.remote.d.ts
39 lines (37 loc) · 1.29 KB
/
github-electron.remote.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Type definitions for Electron v0.37.2
// Project: http://electron.atom.io/
// Definitions by: jedmao <https://github.com/jedmao/>, rhysd <https://rhysd.github.io>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference path="github-electron.d.ts" />
/// <reference path="github-electron.browser-window.d.ts" />
/// <reference path="github-electron.web-contents.d.ts" />
declare namespace Electron {
/**
* The remote module provides a simple way to do inter-process communication (IPC)
* between the renderer process (web page) and the main process.
*/
interface Remote extends CommonElectron {
/**
* @returns The object returned by require(module) in the main process.
*/
require(module: string): any;
/**
* @returns The BrowserWindow object which this web page belongs to.
*/
getCurrentWindow(): BrowserWindow;
/**
* @returns The WebContents object of this web page.
*/
getCurrentWebContents(): WebContents;
/**
* @returns The global variable of name (e.g. global[name]) in the main process.
*/
getGlobal(name: string): any;
/**
* Returns the process object in the main process. This is the same as
* remote.getGlobal('process'), but gets cached.
*/
process: NodeJS.Process;
}
}