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.
Files changed (2) hide show
  1. package/electron.d.ts +79 -86
  2. package/package.json +1 -1
package/electron.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 1.7.8
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
- ctrlkey?: boolean;
35
+ ctrlKey?: boolean;
36
36
  metaKey?: boolean;
37
37
  shiftKey?: boolean;
38
+ altKey?: boolean;
38
39
  }
39
40
 
40
41
  interface CommonInterface {
41
- clipboard: Electron.Clipboard;
42
- crashReporter: Electron.CrashReporter;
43
- nativeImage: typeof Electron.NativeImage;
44
- screen: Electron.Screen;
45
- shell: Electron.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: Electron.App;
50
- autoUpdater: Electron.AutoUpdater;
51
- BrowserView: typeof Electron.BrowserView;
52
- BrowserWindow: typeof Electron.BrowserWindow;
53
- ClientRequest: typeof Electron.ClientRequest;
54
- contentTracing: Electron.ContentTracing;
55
- Cookies: typeof Electron.Cookies;
56
- Debugger: typeof Electron.Debugger;
57
- dialog: Electron.Dialog;
58
- DownloadItem: typeof Electron.DownloadItem;
59
- globalShortcut: Electron.GlobalShortcut;
60
- IncomingMessage: typeof Electron.IncomingMessage;
61
- ipcMain: Electron.IpcMain;
62
- Menu: typeof Electron.Menu;
63
- MenuItem: typeof Electron.MenuItem;
64
- net: Electron.Net;
65
- Notification: typeof Electron.Notification;
66
- powerMonitor: Electron.PowerMonitor;
67
- powerSaveBlocker: Electron.PowerSaveBlocker;
68
- protocol: Electron.Protocol;
69
- session: typeof Electron.Session;
70
- systemPreferences: Electron.SystemPreferences;
71
- TouchBar: typeof Electron.TouchBar;
72
- Tray: typeof Electron.Tray;
73
- webContents: typeof Electron.WebContents;
74
- WebRequest: typeof Electron.WebRequest;
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 Electron.BrowserWindowProxy;
79
- desktopCapturer: Electron.DesktopCapturer;
80
- ipcRenderer: Electron.IpcRenderer;
81
- remote: Electron.Remote;
82
- webFrame: Electron.WebFrame;
83
- webviewTag: Electron.WebviewTag;
84
- }
85
-
86
- interface AllElectron {
87
- app: Electron.App;
88
- autoUpdater: Electron.AutoUpdater;
89
- BrowserView: typeof Electron.BrowserView;
90
- BrowserWindow: typeof Electron.BrowserWindow;
91
- BrowserWindowProxy: typeof Electron.BrowserWindowProxy;
92
- ClientRequest: typeof Electron.ClientRequest;
93
- clipboard: Electron.Clipboard;
94
- contentTracing: Electron.ContentTracing;
95
- Cookies: typeof Electron.Cookies;
96
- crashReporter: Electron.CrashReporter;
97
- Debugger: typeof Electron.Debugger;
98
- desktopCapturer: Electron.DesktopCapturer;
99
- dialog: Electron.Dialog;
100
- DownloadItem: typeof Electron.DownloadItem;
101
- globalShortcut: Electron.GlobalShortcut;
102
- IncomingMessage: typeof Electron.IncomingMessage;
103
- ipcMain: Electron.IpcMain;
104
- ipcRenderer: Electron.IpcRenderer;
105
- Menu: typeof Electron.Menu;
106
- MenuItem: typeof Electron.MenuItem;
107
- nativeImage: typeof Electron.NativeImage;
108
- net: Electron.Net;
109
- Notification: typeof Electron.Notification;
110
- powerMonitor: Electron.PowerMonitor;
111
- powerSaveBlocker: Electron.PowerSaveBlocker;
112
- protocol: Electron.Protocol;
113
- remote: Electron.Remote;
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: any | string);
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: ('left' | 'right' | 'overlay');
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
- const electron: Electron.AllElectron;
8073
- export = electron;
8066
+ export = Electron;
8074
8067
  }
8075
8068
 
8076
8069
  interface NodeRequireFunction {
8077
- (moduleName: 'electron'): Electron.AllElectron;
8070
+ (moduleName: 'electron'): typeof Electron;
8078
8071
  }
8079
8072
 
8080
8073
  interface File {
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "test": "test"
25
25
  },
26
26
  "name": "electron",
27
- "version": "1.7.8",
27
+ "version": "1.7.12",
28
28
  "repository": "https://github.com/electron/electron",
29
29
  "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
30
30
  "license": "MIT",