electron-types 45.0.0-alpha.12 → 45.0.0-alpha.13
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 +74 -29
- 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@45.0.0-alpha.
|
|
17
|
+
npm install -D electron-types@45.0.0-alpha.13
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@45.0.0-alpha.
|
|
19
|
+
yarn add -D electron-types@45.0.0-alpha.13
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@45.0.0-alpha.
|
|
21
|
+
pnpm add -D electron-types@45.0.0-alpha.13
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 45.0.0-alpha.
|
|
1
|
+
// Type definitions for Electron 45.0.0-alpha.13
|
|
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
|
|
@@ -3373,6 +3373,16 @@ declare namespace Electron {
|
|
|
3373
3373
|
* it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10
|
|
3374
3374
|
* version 2004 and up the window will be removed from capture entirely, older
|
|
3375
3375
|
* Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
|
|
3376
|
+
* The change takes effect with the next desktop composition, not when the call
|
|
3377
|
+
* returns, so a capture started immediately afterwards can still contain the
|
|
3378
|
+
* window.
|
|
3379
|
+
*
|
|
3380
|
+
* Protection also applies in a Windows remote session. A Remote Desktop client
|
|
3381
|
+
* still shows the window to the remote user, but remote access software that works
|
|
3382
|
+
* by capturing the desktop cannot. To leave windows unprotected in remote sessions
|
|
3383
|
+
* instead, disable the `AllowWindowCaptureExclusionInRemoteSessions` Chromium
|
|
3384
|
+
* feature at the start of your main script. `win.isContentProtected()` still
|
|
3385
|
+
* returns `true` in that case.
|
|
3376
3386
|
*
|
|
3377
3387
|
* @platform darwin,win32
|
|
3378
3388
|
*/
|
|
@@ -3438,7 +3448,10 @@ declare namespace Electron {
|
|
|
3438
3448
|
* Makes the window ignore all mouse events.
|
|
3439
3449
|
*
|
|
3440
3450
|
* All mouse events happened in this window will be passed to the window below this
|
|
3441
|
-
* window, but if this window has focus, it will still receive keyboard events.
|
|
3451
|
+
* window, but if this window has focus, it will still receive keyboard events. On
|
|
3452
|
+
* Linux this is supported on both X11 and Wayland. On X11 the X server has applied
|
|
3453
|
+
* the window's new input shape when the call returns; on Wayland the new input
|
|
3454
|
+
* region is applied with the window's next frame.
|
|
3442
3455
|
*/
|
|
3443
3456
|
setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
|
|
3444
3457
|
/**
|
|
@@ -6191,7 +6204,16 @@ declare namespace Electron {
|
|
|
6191
6204
|
* On Windows, it calls `SetWindowDisplayAffinity` with `WDA_EXCLUDEFROMCAPTURE`.
|
|
6192
6205
|
* For Windows 10 version 2004 and up the window will be removed from capture
|
|
6193
6206
|
* entirely, older Windows versions behave as if `WDA_MONITOR` is applied capturing
|
|
6194
|
-
* a black window.
|
|
6207
|
+
* a black window. The change takes effect with the next desktop composition, not
|
|
6208
|
+
* when the call returns, so a capture started immediately afterwards can still
|
|
6209
|
+
* contain the window.
|
|
6210
|
+
*
|
|
6211
|
+
* Protection also applies in a Windows remote session. A Remote Desktop client
|
|
6212
|
+
* still shows the window to the remote user, but remote access software that works
|
|
6213
|
+
* by capturing the desktop cannot. To leave windows unprotected in remote sessions
|
|
6214
|
+
* instead, disable the `AllowWindowCaptureExclusionInRemoteSessions` Chromium
|
|
6215
|
+
* feature at the start of your main script. `win.isContentProtected()` still
|
|
6216
|
+
* returns `true` in that case.
|
|
6195
6217
|
*
|
|
6196
6218
|
* On macOS, it sets the `NSWindow`'s `sharingType` to `NSWindowSharingNone`.
|
|
6197
6219
|
* Unfortunately, due to an intentional change in macOS, newer Mac applications
|
|
@@ -6261,7 +6283,10 @@ declare namespace Electron {
|
|
|
6261
6283
|
* Makes the window ignore all mouse events.
|
|
6262
6284
|
*
|
|
6263
6285
|
* All mouse events happened in this window will be passed to the window below this
|
|
6264
|
-
* window, but if this window has focus, it will still receive keyboard events.
|
|
6286
|
+
* window, but if this window has focus, it will still receive keyboard events. On
|
|
6287
|
+
* Linux this is supported on both X11 and Wayland. On X11 the X server has applied
|
|
6288
|
+
* the window's new input shape when the call returns; on Wayland the new input
|
|
6289
|
+
* region is applied with the window's next frame.
|
|
6265
6290
|
*/
|
|
6266
6291
|
setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
|
|
6267
6292
|
/**
|
|
@@ -7122,7 +7147,7 @@ declare namespace Electron {
|
|
|
7122
7147
|
* resolves to a ClipboardBookmark object instead. Rejects when `type` is not
|
|
7123
7148
|
* present in `clipboardItem.types`.
|
|
7124
7149
|
*/
|
|
7125
|
-
getType(type:
|
|
7150
|
+
getType<T extends string>(type: T): Promise<string extends T ? (Blob | ClipboardBookmark) : T extends 'electron application/bookmark' ? ClipboardBookmark : Blob>;
|
|
7126
7151
|
/**
|
|
7127
7152
|
* Resolves with a ClipboardBookmark when a bookmark is available in the clipboard.
|
|
7128
7153
|
* Rejects when a bookmark is not available in the clipboard.
|
|
@@ -7471,7 +7496,9 @@ declare namespace Electron {
|
|
|
7471
7496
|
/**
|
|
7472
7497
|
* Set an extra parameter to be sent with the crash report. The values specified
|
|
7473
7498
|
* here will be sent in addition to any values set via the `extra` option when
|
|
7474
|
-
* `start` was called.
|
|
7499
|
+
* `start` was called. Calling this again with the same key replaces the value. The
|
|
7500
|
+
* value is read when a crash happens, so you can update it as your app's state
|
|
7501
|
+
* changes.
|
|
7475
7502
|
*
|
|
7476
7503
|
* Parameters added in this fashion (or via the `extra` parameter to
|
|
7477
7504
|
* `crashReporter.start`) are specific to the calling process. Adding extra
|
|
@@ -7479,29 +7506,42 @@ declare namespace Electron {
|
|
|
7479
7506
|
* with crashes from renderer or other child processes. Similarly, adding extra
|
|
7480
7507
|
* parameters in a renderer process will not result in those parameters being sent
|
|
7481
7508
|
* with crashes that occur in other renderer processes or in the main process.
|
|
7509
|
+
* Processes created with `utilityProcess` have no API for setting extra
|
|
7510
|
+
* parameters, so only `globalExtra` values are sent with their crashes.
|
|
7482
7511
|
*
|
|
7483
7512
|
* > [!NOTE] Parameters have limits on the length of the keys and values. Key names
|
|
7484
7513
|
* must be no longer than 39 bytes, and values must be no longer than 20320 bytes.
|
|
7485
|
-
* Keys with names longer than the maximum
|
|
7486
|
-
* longer than the maximum length
|
|
7514
|
+
* Keys with names longer than the maximum are ignored, and a warning is emitted.
|
|
7515
|
+
* Values longer than the maximum length are truncated.
|
|
7487
7516
|
*/
|
|
7488
7517
|
addExtraParameter(key: string, value: string): void;
|
|
7489
7518
|
/**
|
|
7490
|
-
* The date and ID of the
|
|
7491
|
-
*
|
|
7492
|
-
*
|
|
7493
|
-
*
|
|
7519
|
+
* The date and ID of the crash report with the most recent upload time, from the
|
|
7520
|
+
* list returned by `getUploadedReports()`. If there are no crash reports at all,
|
|
7521
|
+
* `null` is returned.
|
|
7522
|
+
*
|
|
7523
|
+
* If no report has been uploaded yet but some are stored on disk, a report that
|
|
7524
|
+
* has not been uploaded may be returned. Check that its `id` is not empty before
|
|
7525
|
+
* treating it as uploaded.
|
|
7494
7526
|
*
|
|
7495
7527
|
* > [!NOTE] This method is only available in the main process.
|
|
7496
7528
|
*/
|
|
7497
7529
|
getLastCrashReport(): (CrashReport) | (null);
|
|
7498
7530
|
/**
|
|
7499
|
-
* The current 'extra' parameters of the crash reporter
|
|
7531
|
+
* The current 'extra' parameters of the crash reporter in the calling process, as
|
|
7532
|
+
* set with the `extra` option and `addExtraParameter`. Parameters set with the
|
|
7533
|
+
* `globalExtra` option are not included.
|
|
7500
7534
|
*/
|
|
7501
7535
|
getParameters(): Record<string, string>;
|
|
7502
7536
|
/**
|
|
7503
|
-
* Returns
|
|
7504
|
-
* ID.
|
|
7537
|
+
* Returns the crash reports stored on disk. Each report contains the date it was
|
|
7538
|
+
* uploaded and the ID that the crash server returned for it.
|
|
7539
|
+
*
|
|
7540
|
+
* Despite the method's name, reports that have not been uploaded (for example
|
|
7541
|
+
* because `uploadToServer` is `false`, the upload failed, or the report was rate
|
|
7542
|
+
* limited) are included too. For those reports, `id` is an empty string and `date`
|
|
7543
|
+
* is not meaningful. To list only uploaded reports, filter out reports with an
|
|
7544
|
+
* empty `id`.
|
|
7505
7545
|
*
|
|
7506
7546
|
* > [!NOTE] This method is only available in the main process.
|
|
7507
7547
|
*/
|
|
@@ -7544,9 +7584,9 @@ declare namespace Electron {
|
|
|
7544
7584
|
*
|
|
7545
7585
|
* > [!NOTE] Parameters passed in `extra`, `globalExtra` or set with
|
|
7546
7586
|
* `addExtraParameter` have limits on the length of the keys and values. Key names
|
|
7547
|
-
* must be at most 39 bytes long, and values must be no longer than
|
|
7548
|
-
* with names longer than the maximum
|
|
7549
|
-
* than the maximum length
|
|
7587
|
+
* must be at most 39 bytes long, and values must be no longer than 20320 bytes.
|
|
7588
|
+
* Keys with names longer than the maximum are ignored, and a warning is emitted.
|
|
7589
|
+
* Values longer than the maximum length are truncated.
|
|
7550
7590
|
*
|
|
7551
7591
|
* > [!NOTE] This method is only available in the main process.
|
|
7552
7592
|
*/
|
|
@@ -18942,7 +18982,8 @@ declare namespace Electron {
|
|
|
18942
18982
|
*/
|
|
18943
18983
|
setUserAgent(userAgent: string): void;
|
|
18944
18984
|
/**
|
|
18945
|
-
* Sets the maximum and minimum pinch-to-zoom level.
|
|
18985
|
+
* Sets the maximum and minimum pinch-to-zoom level. The page keeps its normal
|
|
18986
|
+
* scale until the user pinches; a `minimumLevel` below 1 only allows zooming out.
|
|
18946
18987
|
*
|
|
18947
18988
|
* > [!NOTE] Visual zoom is disabled by default in Electron. To re-enable it, call:
|
|
18948
18989
|
*/
|
|
@@ -18974,14 +19015,15 @@ declare namespace Electron {
|
|
|
18974
19015
|
* Changes the zoom factor to the specified factor. Zoom factor is zoom percent
|
|
18975
19016
|
* divided by 100, so 300% = 3.0.
|
|
18976
19017
|
*
|
|
18977
|
-
* The factor must be greater than 0.0.
|
|
19018
|
+
* The factor must be greater than 0.0. Values outside the range Chromium can
|
|
19019
|
+
* display (0.25 to 5.0) are clamped to it.
|
|
18978
19020
|
*/
|
|
18979
19021
|
setZoomFactor(factor: number): void;
|
|
18980
19022
|
/**
|
|
18981
19023
|
* Changes the zoom level to the specified level. The original size is 0 and each
|
|
18982
|
-
* increment above or below represents zooming 20% larger or smaller
|
|
18983
|
-
*
|
|
18984
|
-
*
|
|
19024
|
+
* increment above or below represents zooming 20% larger or smaller. The formula
|
|
19025
|
+
* for this is `scale := 1.2 ^ level`, and the level is clamped to the range
|
|
19026
|
+
* Chromium can display (25% to 500%, about -7.6 to 8.8).
|
|
18985
19027
|
*
|
|
18986
19028
|
* > [!NOTE] The zoom policy at the Chromium level is same-origin by default,
|
|
18987
19029
|
* meaning that the zoom level for a specific domain propagates across all
|
|
@@ -21820,18 +21862,20 @@ declare namespace Electron {
|
|
|
21820
21862
|
uploadToServer?: boolean;
|
|
21821
21863
|
/**
|
|
21822
21864
|
* If true, crashes generated in the main process will not be forwarded to the
|
|
21823
|
-
* system crash handler. Default is `false`.
|
|
21865
|
+
* system crash handler. This option has no effect on Windows. Default is `false`.
|
|
21866
|
+
*
|
|
21867
|
+
* @platform darwin,linux
|
|
21824
21868
|
*/
|
|
21825
21869
|
ignoreSystemCrashHandler?: boolean;
|
|
21826
21870
|
/**
|
|
21827
|
-
* If true, limit the number of crashes uploaded to 1/hour.
|
|
21828
|
-
*
|
|
21829
|
-
* @platform darwin,win32
|
|
21871
|
+
* If true, limit the number of crashes uploaded to 1/hour. Crash reports over the
|
|
21872
|
+
* limit are not uploaded, but are still stored on disk. Default is `false`.
|
|
21830
21873
|
*/
|
|
21831
21874
|
rateLimit?: boolean;
|
|
21832
21875
|
/**
|
|
21833
21876
|
* If true, crash reports will be compressed and uploaded with `Content-Encoding:
|
|
21834
|
-
* gzip`.
|
|
21877
|
+
* gzip`. Setting this to `false` while `uploadToServer` is `true` is deprecated
|
|
21878
|
+
* and logs a deprecation warning. Default is `true`.
|
|
21835
21879
|
*/
|
|
21836
21880
|
compress?: boolean;
|
|
21837
21881
|
/**
|
|
@@ -21848,7 +21892,8 @@ declare namespace Electron {
|
|
|
21848
21892
|
* crash reporter has been started. If a key is present in both the global extra
|
|
21849
21893
|
* parameters and the process-specific extra parameters, then the global one will
|
|
21850
21894
|
* take precedence. By default, `productName` and the app version are included, as
|
|
21851
|
-
* well as the Electron version.
|
|
21895
|
+
* well as the Electron version. Global extra parameters are not returned by
|
|
21896
|
+
* `getParameters()`.
|
|
21852
21897
|
*/
|
|
21853
21898
|
globalExtra?: Record<string, string>;
|
|
21854
21899
|
}
|
package/dist/version.json
CHANGED