electron 1.7.8 → 1.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/electron.d.ts +79 -86
- package/package.json +1 -1
package/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 1.7.
|
|
1
|
+
// Type definitions for Electron 1.7.12
|
|
2
2
|
// Project: http://electron.atom.io/
|
|
3
3
|
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
|
4
4
|
// Definitions: https://github.com/electron/electron-typescript-definitions
|
|
@@ -32,96 +32,86 @@ declare namespace Electron {
|
|
|
32
32
|
preventDefault: () => void;
|
|
33
33
|
sender: WebContents;
|
|
34
34
|
returnValue: any;
|
|
35
|
-
|
|
35
|
+
ctrlKey?: boolean;
|
|
36
36
|
metaKey?: boolean;
|
|
37
37
|
shiftKey?: boolean;
|
|
38
|
+
altKey?: boolean;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
interface CommonInterface {
|
|
41
|
-
clipboard:
|
|
42
|
-
crashReporter:
|
|
43
|
-
nativeImage: typeof
|
|
44
|
-
screen:
|
|
45
|
-
shell:
|
|
42
|
+
clipboard: Clipboard;
|
|
43
|
+
crashReporter: CrashReporter;
|
|
44
|
+
nativeImage: typeof NativeImage;
|
|
45
|
+
screen: Screen;
|
|
46
|
+
shell: Shell;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
interface MainInterface extends CommonInterface {
|
|
49
|
-
app:
|
|
50
|
-
autoUpdater:
|
|
51
|
-
BrowserView: typeof
|
|
52
|
-
BrowserWindow: typeof
|
|
53
|
-
ClientRequest: typeof
|
|
54
|
-
contentTracing:
|
|
55
|
-
Cookies: typeof
|
|
56
|
-
Debugger: typeof
|
|
57
|
-
dialog:
|
|
58
|
-
DownloadItem: typeof
|
|
59
|
-
globalShortcut:
|
|
60
|
-
IncomingMessage: typeof
|
|
61
|
-
ipcMain:
|
|
62
|
-
Menu: typeof
|
|
63
|
-
MenuItem: typeof
|
|
64
|
-
net:
|
|
65
|
-
Notification: typeof
|
|
66
|
-
powerMonitor:
|
|
67
|
-
powerSaveBlocker:
|
|
68
|
-
protocol:
|
|
69
|
-
session: typeof
|
|
70
|
-
systemPreferences:
|
|
71
|
-
TouchBar: typeof
|
|
72
|
-
Tray: typeof
|
|
73
|
-
webContents: typeof
|
|
74
|
-
WebRequest: typeof
|
|
50
|
+
app: App;
|
|
51
|
+
autoUpdater: AutoUpdater;
|
|
52
|
+
BrowserView: typeof BrowserView;
|
|
53
|
+
BrowserWindow: typeof BrowserWindow;
|
|
54
|
+
ClientRequest: typeof ClientRequest;
|
|
55
|
+
contentTracing: ContentTracing;
|
|
56
|
+
Cookies: typeof Cookies;
|
|
57
|
+
Debugger: typeof Debugger;
|
|
58
|
+
dialog: Dialog;
|
|
59
|
+
DownloadItem: typeof DownloadItem;
|
|
60
|
+
globalShortcut: GlobalShortcut;
|
|
61
|
+
IncomingMessage: typeof IncomingMessage;
|
|
62
|
+
ipcMain: IpcMain;
|
|
63
|
+
Menu: typeof Menu;
|
|
64
|
+
MenuItem: typeof MenuItem;
|
|
65
|
+
net: Net;
|
|
66
|
+
Notification: typeof Notification;
|
|
67
|
+
powerMonitor: PowerMonitor;
|
|
68
|
+
powerSaveBlocker: PowerSaveBlocker;
|
|
69
|
+
protocol: Protocol;
|
|
70
|
+
session: typeof Session;
|
|
71
|
+
systemPreferences: SystemPreferences;
|
|
72
|
+
TouchBar: typeof TouchBar;
|
|
73
|
+
Tray: typeof Tray;
|
|
74
|
+
webContents: typeof WebContents;
|
|
75
|
+
WebRequest: typeof WebRequest;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
interface RendererInterface extends CommonInterface {
|
|
78
|
-
BrowserWindowProxy: typeof
|
|
79
|
-
desktopCapturer:
|
|
80
|
-
ipcRenderer:
|
|
81
|
-
remote:
|
|
82
|
-
webFrame:
|
|
83
|
-
webviewTag:
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
interface AllElectron {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
screen: Electron.Screen;
|
|
115
|
-
session: typeof Electron.Session;
|
|
116
|
-
shell: Electron.Shell;
|
|
117
|
-
systemPreferences: Electron.SystemPreferences;
|
|
118
|
-
TouchBar: typeof Electron.TouchBar;
|
|
119
|
-
Tray: typeof Electron.Tray;
|
|
120
|
-
webContents: typeof Electron.WebContents;
|
|
121
|
-
webFrame: Electron.WebFrame;
|
|
122
|
-
WebRequest: typeof Electron.WebRequest;
|
|
123
|
-
webviewTag: Electron.WebviewTag;
|
|
124
|
-
}
|
|
79
|
+
BrowserWindowProxy: typeof BrowserWindowProxy;
|
|
80
|
+
desktopCapturer: DesktopCapturer;
|
|
81
|
+
ipcRenderer: IpcRenderer;
|
|
82
|
+
remote: Remote;
|
|
83
|
+
webFrame: WebFrame;
|
|
84
|
+
webviewTag: WebviewTag;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface AllElectron extends MainInterface, RendererInterface {}
|
|
88
|
+
|
|
89
|
+
const app: App;
|
|
90
|
+
const autoUpdater: AutoUpdater;
|
|
91
|
+
const clipboard: Clipboard;
|
|
92
|
+
const contentTracing: ContentTracing;
|
|
93
|
+
const crashReporter: CrashReporter;
|
|
94
|
+
const desktopCapturer: DesktopCapturer;
|
|
95
|
+
const dialog: Dialog;
|
|
96
|
+
const globalShortcut: GlobalShortcut;
|
|
97
|
+
const ipcMain: IpcMain;
|
|
98
|
+
const ipcRenderer: IpcRenderer;
|
|
99
|
+
type nativeImage = NativeImage;
|
|
100
|
+
const nativeImage: typeof NativeImage;
|
|
101
|
+
const net: Net;
|
|
102
|
+
const powerMonitor: PowerMonitor;
|
|
103
|
+
const powerSaveBlocker: PowerSaveBlocker;
|
|
104
|
+
const protocol: Protocol;
|
|
105
|
+
const remote: Remote;
|
|
106
|
+
const screen: Screen;
|
|
107
|
+
type session = Session;
|
|
108
|
+
const session: typeof Session;
|
|
109
|
+
const shell: Shell;
|
|
110
|
+
const systemPreferences: SystemPreferences;
|
|
111
|
+
type webContents = WebContents;
|
|
112
|
+
const webContents: typeof WebContents;
|
|
113
|
+
const webFrame: WebFrame;
|
|
114
|
+
const webviewTag: WebviewTag;
|
|
125
115
|
|
|
126
116
|
interface App extends EventEmitter {
|
|
127
117
|
|
|
@@ -1699,7 +1689,7 @@ declare namespace Electron {
|
|
|
1699
1689
|
* An object representing the HTTP response message.
|
|
1700
1690
|
*/
|
|
1701
1691
|
response: IncomingMessage) => void): this;
|
|
1702
|
-
constructor(options:
|
|
1692
|
+
constructor(options: 'method' | 'url' | 'session' | 'partition' | 'protocol' | 'host' | 'hostname' | 'port' | 'path' | 'redirect');
|
|
1703
1693
|
/**
|
|
1704
1694
|
* Cancels an ongoing HTTP transaction. If the request has already emitted the
|
|
1705
1695
|
* close event, the abort operation will have no effect. Otherwise an ongoing event
|
|
@@ -5585,6 +5575,10 @@ declare namespace Electron {
|
|
|
5585
5575
|
*/
|
|
5586
5576
|
addEventListener(event: 'devtools-focused', listener: (event: Event) => void, useCapture?: boolean): this;
|
|
5587
5577
|
removeEventListener(event: 'devtools-focused', listener: (event: Event) => void): this;
|
|
5578
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
|
|
5579
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
|
5580
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
|
|
5581
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
|
5588
5582
|
canGoBack(): boolean;
|
|
5589
5583
|
canGoForward(): boolean;
|
|
5590
5584
|
canGoToOffset(offset: number): boolean;
|
|
@@ -7591,7 +7585,7 @@ declare namespace Electron {
|
|
|
7591
7585
|
/**
|
|
7592
7586
|
* Can be left, right or overlay.
|
|
7593
7587
|
*/
|
|
7594
|
-
iconPosition
|
|
7588
|
+
iconPosition?: ('left' | 'right' | 'overlay');
|
|
7595
7589
|
/**
|
|
7596
7590
|
* Function to call when the button is clicked.
|
|
7597
7591
|
*/
|
|
@@ -7614,7 +7608,7 @@ declare namespace Electron {
|
|
|
7614
7608
|
}
|
|
7615
7609
|
|
|
7616
7610
|
interface TouchBarConstructorOptions {
|
|
7617
|
-
items: TouchBarButton | TouchBarColorPicker | TouchBarGroup | TouchBarLabel | TouchBarPopover | TouchBarScrubber | TouchBarSegmentedControl | TouchBarSlider | TouchBarSpacer
|
|
7611
|
+
items: Array<TouchBarButton | TouchBarColorPicker | TouchBarGroup | TouchBarLabel | TouchBarPopover | TouchBarScrubber | TouchBarSegmentedControl | TouchBarSlider | TouchBarSpacer>;
|
|
7618
7612
|
escapeItem?: TouchBarButton | TouchBarColorPicker | TouchBarGroup | TouchBarLabel | TouchBarPopover | TouchBarScrubber | TouchBarSegmentedControl | TouchBarSlider | TouchBarSpacer;
|
|
7619
7613
|
}
|
|
7620
7614
|
|
|
@@ -8069,12 +8063,11 @@ declare namespace Electron {
|
|
|
8069
8063
|
}
|
|
8070
8064
|
|
|
8071
8065
|
declare module 'electron' {
|
|
8072
|
-
|
|
8073
|
-
export = electron;
|
|
8066
|
+
export = Electron;
|
|
8074
8067
|
}
|
|
8075
8068
|
|
|
8076
8069
|
interface NodeRequireFunction {
|
|
8077
|
-
(moduleName: 'electron'): Electron
|
|
8070
|
+
(moduleName: 'electron'): typeof Electron;
|
|
8078
8071
|
}
|
|
8079
8072
|
|
|
8080
8073
|
interface File {
|
package/package.json
CHANGED