electron-types 44.0.0-alpha.5 → 44.0.0-alpha.7
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/README.md +3 -3
- package/dist/electron.d.ts +60 -35
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,11 +14,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
|
|
|
14
14
|
Since this package only provides TypeScript types, install it as a dev dependency. **Install the version that matches your Electron version** (see [Version Matching](#version-matching)):
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install -D electron-types@44.0.0-alpha.
|
|
17
|
+
npm install -D electron-types@44.0.0-alpha.7
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@44.0.0-alpha.
|
|
19
|
+
yarn add -D electron-types@44.0.0-alpha.7
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@44.0.0-alpha.
|
|
21
|
+
pnpm add -D electron-types@44.0.0-alpha.7
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 44.0.0-alpha.
|
|
1
|
+
// Type definitions for Electron 44.0.0-alpha.7
|
|
2
2
|
// Project: http://electronjs.org/
|
|
3
3
|
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
|
4
4
|
// Definitions: https://github.com/electron/typescript-definitions
|
|
@@ -50,7 +50,7 @@ declare namespace Electron {
|
|
|
50
50
|
// Docs: https://electronjs.org/docs/api/app
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Emitted when
|
|
53
|
+
* Emitted when Chromium's accessibility support changes. This event fires when
|
|
54
54
|
* assistive technologies, such as screen readers, are enabled or disabled. See
|
|
55
55
|
* https://www.chromium.org/developers/design-documents/accessibility for more
|
|
56
56
|
* details.
|
|
@@ -59,7 +59,7 @@ declare namespace Electron {
|
|
|
59
59
|
*/
|
|
60
60
|
on(event: 'accessibility-support-changed', listener: (event: Event,
|
|
61
61
|
/**
|
|
62
|
-
* `true` when
|
|
62
|
+
* `true` when Chromium's accessibility support is enabled, `false` otherwise.
|
|
63
63
|
*/
|
|
64
64
|
accessibilitySupportEnabled: boolean) => void): this;
|
|
65
65
|
/**
|
|
@@ -67,7 +67,7 @@ declare namespace Electron {
|
|
|
67
67
|
*/
|
|
68
68
|
off(event: 'accessibility-support-changed', listener: (event: Event,
|
|
69
69
|
/**
|
|
70
|
-
* `true` when
|
|
70
|
+
* `true` when Chromium's accessibility support is enabled, `false` otherwise.
|
|
71
71
|
*/
|
|
72
72
|
accessibilitySupportEnabled: boolean) => void): this;
|
|
73
73
|
/**
|
|
@@ -75,7 +75,7 @@ declare namespace Electron {
|
|
|
75
75
|
*/
|
|
76
76
|
once(event: 'accessibility-support-changed', listener: (event: Event,
|
|
77
77
|
/**
|
|
78
|
-
* `true` when
|
|
78
|
+
* `true` when Chromium's accessibility support is enabled, `false` otherwise.
|
|
79
79
|
*/
|
|
80
80
|
accessibilitySupportEnabled: boolean) => void): this;
|
|
81
81
|
/**
|
|
@@ -83,7 +83,7 @@ declare namespace Electron {
|
|
|
83
83
|
*/
|
|
84
84
|
addListener(event: 'accessibility-support-changed', listener: (event: Event,
|
|
85
85
|
/**
|
|
86
|
-
* `true` when
|
|
86
|
+
* `true` when Chromium's accessibility support is enabled, `false` otherwise.
|
|
87
87
|
*/
|
|
88
88
|
accessibilitySupportEnabled: boolean) => void): this;
|
|
89
89
|
/**
|
|
@@ -91,7 +91,7 @@ declare namespace Electron {
|
|
|
91
91
|
*/
|
|
92
92
|
removeListener(event: 'accessibility-support-changed', listener: (event: Event,
|
|
93
93
|
/**
|
|
94
|
-
* `true` when
|
|
94
|
+
* `true` when Chromium's accessibility support is enabled, `false` otherwise.
|
|
95
95
|
*/
|
|
96
96
|
accessibilitySupportEnabled: boolean) => void): this;
|
|
97
97
|
/**
|
|
@@ -806,6 +806,13 @@ declare namespace Electron {
|
|
|
806
806
|
* and `callback` can be called with an entry filtered from the list. Using
|
|
807
807
|
* `event.preventDefault()` prevents the application from using the first
|
|
808
808
|
* certificate from the store.
|
|
809
|
+
*
|
|
810
|
+
* `webContents` is `null` when the request does not originate from a renderer
|
|
811
|
+
* process, for example when using `net.request` or `net.fetch` in the main
|
|
812
|
+
* process, or from a utility process created with
|
|
813
|
+
* `respondToAuthRequestsFromMainProcess: true`. For utility processes created
|
|
814
|
+
* without that flag, `net` requests proceed without a client certificate and this
|
|
815
|
+
* event is not emitted.
|
|
809
816
|
*/
|
|
810
817
|
on(event: 'select-client-certificate', listener: (event: Event,
|
|
811
818
|
webContents: WebContents,
|
|
@@ -1396,9 +1403,9 @@ declare namespace Electron {
|
|
|
1396
1403
|
*/
|
|
1397
1404
|
invalidateCurrentActivity(): void;
|
|
1398
1405
|
/**
|
|
1399
|
-
* `true` if
|
|
1400
|
-
* will return `true` if the use of assistive technologies, such as screen
|
|
1401
|
-
* has been detected. See
|
|
1406
|
+
* `true` if Chromium's accessibility support is enabled, `false` otherwise. This
|
|
1407
|
+
* API will return `true` if the use of assistive technologies, such as screen
|
|
1408
|
+
* readers, has been detected. See
|
|
1402
1409
|
* https://www.chromium.org/developers/design-documents/accessibility for more
|
|
1403
1410
|
* details.
|
|
1404
1411
|
*
|
|
@@ -1583,7 +1590,7 @@ declare namespace Electron {
|
|
|
1583
1590
|
*/
|
|
1584
1591
|
setAboutPanelOptions(options: AboutPanelOptionsOptions): void;
|
|
1585
1592
|
/**
|
|
1586
|
-
* Manually enables
|
|
1593
|
+
* Manually enables Chromium's accessibility support, allowing to expose
|
|
1587
1594
|
* accessibility switch to users in application settings. See Chromium's
|
|
1588
1595
|
* accessibility docs for more details. Disabled by default.
|
|
1589
1596
|
*
|
|
@@ -1887,10 +1894,10 @@ declare namespace Electron {
|
|
|
1887
1894
|
*/
|
|
1888
1895
|
whenReady(): Promise<void>;
|
|
1889
1896
|
/**
|
|
1890
|
-
* A `boolean` property that's `true` if
|
|
1891
|
-
* `false` otherwise. This property will be `true` if the use of assistive
|
|
1897
|
+
* A `boolean` property that's `true` if Chromium's accessibility support is
|
|
1898
|
+
* enabled, `false` otherwise. This property will be `true` if the use of assistive
|
|
1892
1899
|
* technologies, such as screen readers, has been detected. Setting this property
|
|
1893
|
-
* to `true` manually enables
|
|
1900
|
+
* to `true` manually enables Chromium's accessibility support, allowing developers
|
|
1894
1901
|
* to expose accessibility switch to users in application settings.
|
|
1895
1902
|
*
|
|
1896
1903
|
* See Chromium's accessibility docs for more details. Disabled by default.
|
|
@@ -10219,8 +10226,8 @@ declare namespace Electron {
|
|
|
10219
10226
|
* see Response.
|
|
10220
10227
|
*
|
|
10221
10228
|
* Sends a request, similarly to how `fetch()` works in the renderer, using
|
|
10222
|
-
*
|
|
10223
|
-
* HTTP stack.
|
|
10229
|
+
* Chromium's network stack. This differs from Node's `fetch()`, which uses
|
|
10230
|
+
* Node.js's HTTP stack.
|
|
10224
10231
|
*
|
|
10225
10232
|
* Example:
|
|
10226
10233
|
*
|
|
@@ -12993,8 +13000,8 @@ declare namespace Electron {
|
|
|
12993
13000
|
* see Response.
|
|
12994
13001
|
*
|
|
12995
13002
|
* Sends a request, similarly to how `fetch()` works in the renderer, using
|
|
12996
|
-
*
|
|
12997
|
-
* HTTP stack.
|
|
13003
|
+
* Chromium's network stack. This differs from Node's `fetch()`, which uses
|
|
13004
|
+
* Node.js's HTTP stack.
|
|
12998
13005
|
*
|
|
12999
13006
|
* Example:
|
|
13000
13007
|
*
|
|
@@ -17148,23 +17155,23 @@ declare namespace Electron {
|
|
|
17148
17155
|
* The usage is the same with the `login` event of `app`.
|
|
17149
17156
|
*/
|
|
17150
17157
|
on(event: 'login', listener: (event: Event,
|
|
17151
|
-
authenticationResponseDetails:
|
|
17158
|
+
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
17152
17159
|
authInfo: AuthInfo,
|
|
17153
17160
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
17154
17161
|
off(event: 'login', listener: (event: Event,
|
|
17155
|
-
authenticationResponseDetails:
|
|
17162
|
+
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
17156
17163
|
authInfo: AuthInfo,
|
|
17157
17164
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
17158
17165
|
once(event: 'login', listener: (event: Event,
|
|
17159
|
-
authenticationResponseDetails:
|
|
17166
|
+
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
17160
17167
|
authInfo: AuthInfo,
|
|
17161
17168
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
17162
17169
|
addListener(event: 'login', listener: (event: Event,
|
|
17163
|
-
authenticationResponseDetails:
|
|
17170
|
+
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
17164
17171
|
authInfo: AuthInfo,
|
|
17165
17172
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
17166
17173
|
removeListener(event: 'login', listener: (event: Event,
|
|
17167
|
-
authenticationResponseDetails:
|
|
17174
|
+
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
17168
17175
|
authInfo: AuthInfo,
|
|
17169
17176
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
17170
17177
|
/**
|
|
@@ -20537,6 +20544,18 @@ declare namespace Electron {
|
|
|
20537
20544
|
interface AuthenticationResponseDetails {
|
|
20538
20545
|
url: string;
|
|
20539
20546
|
pid: number;
|
|
20547
|
+
/**
|
|
20548
|
+
* Indicates whether the request is for a navigation.
|
|
20549
|
+
*/
|
|
20550
|
+
isRequestForNavigation: boolean;
|
|
20551
|
+
/**
|
|
20552
|
+
* Indicates whether this is the first authentication attempt.
|
|
20553
|
+
*/
|
|
20554
|
+
firstAuthAttempt: boolean;
|
|
20555
|
+
/**
|
|
20556
|
+
* The headers returned in the response.
|
|
20557
|
+
*/
|
|
20558
|
+
responseHeaders?: Record<string, (string) | (string[])>;
|
|
20540
20559
|
}
|
|
20541
20560
|
|
|
20542
20561
|
interface AuthInfo {
|
|
@@ -21776,9 +21795,11 @@ declare namespace Electron {
|
|
|
21776
21795
|
* With this flag, all HTTP 401 and 407 network requests created via the net module
|
|
21777
21796
|
* will allow responding to them via the `login` event on the `UtilityProcess`
|
|
21778
21797
|
* instance when a `session` is provided, or via the `app#login` event in the main
|
|
21779
|
-
* process when using the default system network context.
|
|
21780
|
-
*
|
|
21781
|
-
*
|
|
21798
|
+
* process when using the default system network context. This flag also routes
|
|
21799
|
+
* client-certificate selection to the `app#select-client-certificate` event in the
|
|
21800
|
+
* main process; without it, `net` requests from the utility process proceed
|
|
21801
|
+
* without a client certificate. Without this flag, auth challenges are handled by
|
|
21802
|
+
* the default `login` event on the `ClientRequest` object. Default is `false`.
|
|
21782
21803
|
*/
|
|
21783
21804
|
respondToAuthRequestsFromMainProcess?: boolean;
|
|
21784
21805
|
}
|
|
@@ -22092,10 +22113,6 @@ declare namespace Electron {
|
|
|
22092
22113
|
baseURLForDataURL?: string;
|
|
22093
22114
|
}
|
|
22094
22115
|
|
|
22095
|
-
interface LoginAuthenticationResponseDetails {
|
|
22096
|
-
url: string;
|
|
22097
|
-
}
|
|
22098
|
-
|
|
22099
22116
|
interface LoginItemSettings {
|
|
22100
22117
|
/**
|
|
22101
22118
|
* `true` if the app is set to open at login.
|
|
@@ -23776,6 +23793,15 @@ declare namespace Electron {
|
|
|
23776
23793
|
* The total amount of memory not being used by applications or disk cache.
|
|
23777
23794
|
*/
|
|
23778
23795
|
free: number;
|
|
23796
|
+
/**
|
|
23797
|
+
* The kernel's estimate of the amount of memory available for allocation without
|
|
23798
|
+
* swapping, from `/proc/meminfo` `MemAvailable`. Use this as the memory pressure
|
|
23799
|
+
* signal on Linux; `free` there is `MemFree`, which excludes page cache and other
|
|
23800
|
+
* reclaimable memory.
|
|
23801
|
+
*
|
|
23802
|
+
* @platform linux
|
|
23803
|
+
*/
|
|
23804
|
+
available: number;
|
|
23779
23805
|
/**
|
|
23780
23806
|
* The amount of memory that currently has been paged out to storage. Includes
|
|
23781
23807
|
* memory for file caches, network buffers, and other system services.
|
|
@@ -25129,7 +25155,6 @@ declare namespace Electron {
|
|
|
25129
25155
|
type LoadExtensionOptions = Electron.LoadExtensionOptions;
|
|
25130
25156
|
type LoadFileOptions = Electron.LoadFileOptions;
|
|
25131
25157
|
type LoadURLOptions = Electron.LoadURLOptions;
|
|
25132
|
-
type LoginAuthenticationResponseDetails = Electron.LoginAuthenticationResponseDetails;
|
|
25133
25158
|
type LoginItemSettings = Electron.LoginItemSettings;
|
|
25134
25159
|
type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions;
|
|
25135
25160
|
type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
|
|
@@ -25539,7 +25564,6 @@ declare namespace Electron {
|
|
|
25539
25564
|
type LoadExtensionOptions = Electron.LoadExtensionOptions;
|
|
25540
25565
|
type LoadFileOptions = Electron.LoadFileOptions;
|
|
25541
25566
|
type LoadURLOptions = Electron.LoadURLOptions;
|
|
25542
|
-
type LoginAuthenticationResponseDetails = Electron.LoginAuthenticationResponseDetails;
|
|
25543
25567
|
type LoginItemSettings = Electron.LoginItemSettings;
|
|
25544
25568
|
type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions;
|
|
25545
25569
|
type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
|
|
@@ -25876,7 +25900,6 @@ declare namespace Electron {
|
|
|
25876
25900
|
type LoadExtensionOptions = Electron.LoadExtensionOptions;
|
|
25877
25901
|
type LoadFileOptions = Electron.LoadFileOptions;
|
|
25878
25902
|
type LoadURLOptions = Electron.LoadURLOptions;
|
|
25879
|
-
type LoginAuthenticationResponseDetails = Electron.LoginAuthenticationResponseDetails;
|
|
25880
25903
|
type LoginItemSettings = Electron.LoginItemSettings;
|
|
25881
25904
|
type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions;
|
|
25882
25905
|
type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
|
|
@@ -26212,7 +26235,6 @@ declare namespace Electron {
|
|
|
26212
26235
|
type LoadExtensionOptions = Electron.LoadExtensionOptions;
|
|
26213
26236
|
type LoadFileOptions = Electron.LoadFileOptions;
|
|
26214
26237
|
type LoadURLOptions = Electron.LoadURLOptions;
|
|
26215
|
-
type LoginAuthenticationResponseDetails = Electron.LoginAuthenticationResponseDetails;
|
|
26216
26238
|
type LoginItemSettings = Electron.LoginItemSettings;
|
|
26217
26239
|
type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions;
|
|
26218
26240
|
type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
|
|
@@ -26643,7 +26665,6 @@ declare namespace Electron {
|
|
|
26643
26665
|
type LoadExtensionOptions = Electron.LoadExtensionOptions;
|
|
26644
26666
|
type LoadFileOptions = Electron.LoadFileOptions;
|
|
26645
26667
|
type LoadURLOptions = Electron.LoadURLOptions;
|
|
26646
|
-
type LoginAuthenticationResponseDetails = Electron.LoginAuthenticationResponseDetails;
|
|
26647
26668
|
type LoginItemSettings = Electron.LoginItemSettings;
|
|
26648
26669
|
type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions;
|
|
26649
26670
|
type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
|
|
@@ -27039,6 +27060,10 @@ declare namespace NodeJS {
|
|
|
27039
27060
|
* to the system.
|
|
27040
27061
|
* * `free` Integer - The total amount of memory not being used by applications or
|
|
27041
27062
|
* disk cache.
|
|
27063
|
+
* * `available` Integer _Linux_ - The kernel's estimate of the amount of memory
|
|
27064
|
+
* available for allocation without swapping, from `/proc/meminfo` `MemAvailable`.
|
|
27065
|
+
* Use this as the memory pressure signal on Linux; `free` there is `MemFree`,
|
|
27066
|
+
* which excludes page cache and other reclaimable memory.
|
|
27042
27067
|
* * `fileBacked` Integer _macOS_ - The amount of memory that currently has been
|
|
27043
27068
|
* paged out to storage. Includes memory for file caches, network buffers, and
|
|
27044
27069
|
* other system services.
|
package/dist/version.json
CHANGED