electron-types 44.0.0-beta.6 → 44.1.0
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 +84 -13
- 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.
|
|
17
|
+
npm install -D electron-types@44.1.0
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@44.
|
|
19
|
+
yarn add -D electron-types@44.1.0
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@44.
|
|
21
|
+
pnpm add -D electron-types@44.1.0
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 44.
|
|
1
|
+
// Type definitions for Electron 44.1.0
|
|
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
|
|
@@ -518,27 +518,27 @@ declare namespace Electron {
|
|
|
518
518
|
* page.
|
|
519
519
|
*/
|
|
520
520
|
on(event: 'login', listener: (event: Event,
|
|
521
|
-
webContents: WebContents,
|
|
521
|
+
webContents: (WebContents) | (null),
|
|
522
522
|
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
523
523
|
authInfo: AuthInfo,
|
|
524
524
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
525
525
|
off(event: 'login', listener: (event: Event,
|
|
526
|
-
webContents: WebContents,
|
|
526
|
+
webContents: (WebContents) | (null),
|
|
527
527
|
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
528
528
|
authInfo: AuthInfo,
|
|
529
529
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
530
530
|
once(event: 'login', listener: (event: Event,
|
|
531
|
-
webContents: WebContents,
|
|
531
|
+
webContents: (WebContents) | (null),
|
|
532
532
|
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
533
533
|
authInfo: AuthInfo,
|
|
534
534
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
535
535
|
addListener(event: 'login', listener: (event: Event,
|
|
536
|
-
webContents: WebContents,
|
|
536
|
+
webContents: (WebContents) | (null),
|
|
537
537
|
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
538
538
|
authInfo: AuthInfo,
|
|
539
539
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
540
540
|
removeListener(event: 'login', listener: (event: Event,
|
|
541
|
-
webContents: WebContents,
|
|
541
|
+
webContents: (WebContents) | (null),
|
|
542
542
|
authenticationResponseDetails: AuthenticationResponseDetails,
|
|
543
543
|
authInfo: AuthInfo,
|
|
544
544
|
callback: (username?: string, password?: string) => void) => void): this;
|
|
@@ -815,27 +815,27 @@ declare namespace Electron {
|
|
|
815
815
|
* event is not emitted.
|
|
816
816
|
*/
|
|
817
817
|
on(event: 'select-client-certificate', listener: (event: Event,
|
|
818
|
-
webContents: WebContents,
|
|
818
|
+
webContents: (WebContents) | (null),
|
|
819
819
|
url: string,
|
|
820
820
|
certificateList: Certificate[],
|
|
821
821
|
callback: (certificate?: Certificate) => void) => void): this;
|
|
822
822
|
off(event: 'select-client-certificate', listener: (event: Event,
|
|
823
|
-
webContents: WebContents,
|
|
823
|
+
webContents: (WebContents) | (null),
|
|
824
824
|
url: string,
|
|
825
825
|
certificateList: Certificate[],
|
|
826
826
|
callback: (certificate?: Certificate) => void) => void): this;
|
|
827
827
|
once(event: 'select-client-certificate', listener: (event: Event,
|
|
828
|
-
webContents: WebContents,
|
|
828
|
+
webContents: (WebContents) | (null),
|
|
829
829
|
url: string,
|
|
830
830
|
certificateList: Certificate[],
|
|
831
831
|
callback: (certificate?: Certificate) => void) => void): this;
|
|
832
832
|
addListener(event: 'select-client-certificate', listener: (event: Event,
|
|
833
|
-
webContents: WebContents,
|
|
833
|
+
webContents: (WebContents) | (null),
|
|
834
834
|
url: string,
|
|
835
835
|
certificateList: Certificate[],
|
|
836
836
|
callback: (certificate?: Certificate) => void) => void): this;
|
|
837
837
|
removeListener(event: 'select-client-certificate', listener: (event: Event,
|
|
838
|
-
webContents: WebContents,
|
|
838
|
+
webContents: (WebContents) | (null),
|
|
839
839
|
url: string,
|
|
840
840
|
certificateList: Certificate[],
|
|
841
841
|
callback: (certificate?: Certificate) => void) => void): this;
|
|
@@ -9618,6 +9618,15 @@ declare namespace Electron {
|
|
|
9618
9618
|
* @platform darwin
|
|
9619
9619
|
*/
|
|
9620
9620
|
accessibilityLabel: string;
|
|
9621
|
+
/**
|
|
9622
|
+
* A `MenuItemBadge` (optional) indicating the badge for the menu item.
|
|
9623
|
+
*
|
|
9624
|
+
* This property can be dynamically changed; setting it to `undefined` removes the
|
|
9625
|
+
* badge. Only available on macOS 14 and up.
|
|
9626
|
+
*
|
|
9627
|
+
* @platform darwin
|
|
9628
|
+
*/
|
|
9629
|
+
badge?: MenuItemBadge;
|
|
9621
9630
|
/**
|
|
9622
9631
|
* A `boolean` indicating whether the item is checked.
|
|
9623
9632
|
*
|
|
@@ -9678,6 +9687,8 @@ declare namespace Electron {
|
|
|
9678
9687
|
* or just displayed.
|
|
9679
9688
|
*
|
|
9680
9689
|
* This property can be dynamically changed.
|
|
9690
|
+
*
|
|
9691
|
+
* @platform linux,win32
|
|
9681
9692
|
*/
|
|
9682
9693
|
registerAccelerator: boolean;
|
|
9683
9694
|
/**
|
|
@@ -9743,6 +9754,27 @@ declare namespace Electron {
|
|
|
9743
9754
|
visible: boolean;
|
|
9744
9755
|
}
|
|
9745
9756
|
|
|
9757
|
+
interface MenuItemBadge {
|
|
9758
|
+
|
|
9759
|
+
// Docs: https://electronjs.org/docs/api/structures/menu-item-badge
|
|
9760
|
+
|
|
9761
|
+
/**
|
|
9762
|
+
* A custom string to display in the badge. Required for, and only usable with, the
|
|
9763
|
+
* `none` type.
|
|
9764
|
+
*/
|
|
9765
|
+
content?: string;
|
|
9766
|
+
/**
|
|
9767
|
+
* The number of items the badge displays. Required for the `alerts`, `updates` and
|
|
9768
|
+
* `new-items` types; cannot be used with `none`.
|
|
9769
|
+
*/
|
|
9770
|
+
count?: number;
|
|
9771
|
+
/**
|
|
9772
|
+
* Can be `alerts`, `updates`, `new-items` or `none`. Default is `none`. See
|
|
9773
|
+
* Creating badges of a specific type for further explanation of these types.
|
|
9774
|
+
*/
|
|
9775
|
+
type?: ('alerts' | 'updates' | 'new-items' | 'none');
|
|
9776
|
+
}
|
|
9777
|
+
|
|
9746
9778
|
class MessageChannelMain {
|
|
9747
9779
|
|
|
9748
9780
|
// Docs: https://electronjs.org/docs/api/message-channel-main
|
|
@@ -13373,7 +13405,7 @@ declare namespace Electron {
|
|
|
13373
13405
|
* > [!NOTE] `isMainFrame` will always be `false` for a `fileSystem` request as a
|
|
13374
13406
|
* result of Chromium limitations.
|
|
13375
13407
|
*/
|
|
13376
|
-
setPermissionCheckHandler(handler: ((webContents: (WebContents) | (null), permission: 'clipboard-read' | 'clipboard-sanitized-write' | '
|
|
13408
|
+
setPermissionCheckHandler(handler: ((webContents: (WebContents) | (null), permission: 'ar' | 'automatic-fullscreen' | 'background-fetch' | 'background-sync' | 'captured-surface-control' | 'clipboard-read' | 'clipboard-sanitized-write' | 'deprecated-sync-clipboard-read' | 'display-capture' | 'fileSystem' | 'fullscreen' | 'geolocation' | 'geolocation-approximate' | 'hand-tracking' | 'hid' | 'idle-detection' | 'keyboardLock' | 'local-fonts' | 'local-network' | 'local-network-access' | 'loopback-network' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'nfc' | 'notifications' | 'openExternal' | 'payment-handler' | 'periodic-background-sync' | 'persistent-storage' | 'pointerLock' | 'screen-wake-lock' | 'sensors' | 'serial' | 'smart-card' | 'speaker-selection' | 'storage-access' | 'system-wake-lock' | 'top-level-storage-access' | 'usb' | 'vr' | 'web-app-installation' | 'web-printing' | 'window-management' | 'unknown', requestingOrigin: string, details: PermissionCheckHandlerHandlerDetails) => boolean) | (null)): void;
|
|
13377
13409
|
/**
|
|
13378
13410
|
* Sets the handler which can be used to respond to permission requests for the
|
|
13379
13411
|
* `session`. Calling `callback(true)` will allow the permission and
|
|
@@ -13382,7 +13414,7 @@ declare namespace Electron {
|
|
|
13382
13414
|
* `setPermissionCheckHandler` to get complete permission handling. Most web APIs
|
|
13383
13415
|
* do a permission check and then make a permission request if the check is denied.
|
|
13384
13416
|
*/
|
|
13385
|
-
setPermissionRequestHandler(handler: ((webContents: WebContents, permission: 'clipboard-read' | 'clipboard-sanitized-write' | 'display-capture' | 'fullscreen' | 'geolocation' | 'idle-detection' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'notifications' | 'pointerLock' | '
|
|
13417
|
+
setPermissionRequestHandler(handler: ((webContents: WebContents, permission: 'ar' | 'automatic-fullscreen' | 'background-fetch' | 'background-sync' | 'captured-surface-control' | 'clipboard-read' | 'clipboard-sanitized-write' | 'deprecated-sync-clipboard-read' | 'display-capture' | 'fileSystem' | 'fullscreen' | 'geolocation' | 'geolocation-approximate' | 'hand-tracking' | 'hid' | 'idle-detection' | 'keyboardLock' | 'local-fonts' | 'local-network' | 'local-network-access' | 'loopback-network' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'nfc' | 'notifications' | 'openExternal' | 'payment-handler' | 'periodic-background-sync' | 'persistent-storage' | 'pointerLock' | 'screen-wake-lock' | 'sensors' | 'serial' | 'smart-card' | 'speaker-selection' | 'storage-access' | 'system-wake-lock' | 'top-level-storage-access' | 'usb' | 'vr' | 'web-app-installation' | 'web-printing' | 'window-management' | 'unknown', callback: (permissionGranted: boolean) => void, details: (PermissionRequest) | (FilesystemPermissionRequest) | (MediaAccessPermissionRequest) | (OpenExternalPermissionRequest)) => void) | (null)): void;
|
|
13386
13418
|
/**
|
|
13387
13419
|
* Adds scripts that will be executed on ALL web contents that are associated with
|
|
13388
13420
|
* this session just before normal `preload` scripts run.
|
|
@@ -18271,6 +18303,10 @@ declare namespace Electron {
|
|
|
18271
18303
|
* greater than 0.
|
|
18272
18304
|
*/
|
|
18273
18305
|
isBeingCaptured(): boolean;
|
|
18306
|
+
/**
|
|
18307
|
+
* Whether caret browsing is enabled for this page.
|
|
18308
|
+
*/
|
|
18309
|
+
isCaretBrowsingEnabled(): boolean;
|
|
18274
18310
|
/**
|
|
18275
18311
|
* Whether the renderer process has crashed.
|
|
18276
18312
|
*/
|
|
@@ -18506,6 +18542,10 @@ declare namespace Electron {
|
|
|
18506
18542
|
* when the page becomes backgrounded. This also affects the Page Visibility API.
|
|
18507
18543
|
*/
|
|
18508
18544
|
setBackgroundThrottling(allowed: boolean): void;
|
|
18545
|
+
/**
|
|
18546
|
+
* Sets whether caret browsing is enabled on the current web page.
|
|
18547
|
+
*/
|
|
18548
|
+
setCaretBrowsingEnabled(enabled: boolean): void;
|
|
18509
18549
|
/**
|
|
18510
18550
|
* Changes the title of the DevTools window to `title`. This will only be visible
|
|
18511
18551
|
* if DevTools is opened in `undocked` or `detach` mode.
|
|
@@ -18673,6 +18713,25 @@ declare namespace Electron {
|
|
|
18673
18713
|
* affects the Page Visibility API.
|
|
18674
18714
|
*/
|
|
18675
18715
|
backgroundThrottling: boolean;
|
|
18716
|
+
/**
|
|
18717
|
+
* A `boolean` property that determines whether caret browsing is enabled for this
|
|
18718
|
+
* page.
|
|
18719
|
+
*
|
|
18720
|
+
* When enabled, a movable cursor is placed in the page's text, allowing the user
|
|
18721
|
+
* to navigate and select content with the keyboard. Changes apply to the live page
|
|
18722
|
+
* without reloading it.
|
|
18723
|
+
*
|
|
18724
|
+
* A `<webview>` guest inherits this value from its embedder when it is created and
|
|
18725
|
+
* then tracks it independently, so disabling caret browsing on the embedder leaves
|
|
18726
|
+
* an existing guest enabled.
|
|
18727
|
+
*
|
|
18728
|
+
* While any `WebContents` in the process has caret browsing enabled, assistive
|
|
18729
|
+
* technology is notified process-wide that caret browsing is active, so that
|
|
18730
|
+
* screen readers report the caret's position as it moves. That notification is
|
|
18731
|
+
* only withdrawn once every `WebContents` that enabled caret browsing has either
|
|
18732
|
+
* disabled it or been destroyed.
|
|
18733
|
+
*/
|
|
18734
|
+
caretBrowsingEnabled: boolean;
|
|
18676
18735
|
/**
|
|
18677
18736
|
* A `Debugger` instance for this webContents.
|
|
18678
18737
|
*
|
|
@@ -22376,6 +22435,13 @@ declare namespace Electron {
|
|
|
22376
22435
|
* containing group after the containing group of the item with the specified id.
|
|
22377
22436
|
*/
|
|
22378
22437
|
afterGroupContaining?: string[];
|
|
22438
|
+
/**
|
|
22439
|
+
* A badge shown alongside the label, either a system-styled count (`alerts`,
|
|
22440
|
+
* `updates`, `new-items`) or a custom string. Only available on macOS 14 and up.
|
|
22441
|
+
*
|
|
22442
|
+
* @platform darwin
|
|
22443
|
+
*/
|
|
22444
|
+
badge?: MenuItemBadge;
|
|
22379
22445
|
}
|
|
22380
22446
|
|
|
22381
22447
|
interface MessageBoxOptions {
|
|
@@ -25311,6 +25377,7 @@ declare namespace Electron {
|
|
|
25311
25377
|
type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
|
|
25312
25378
|
type MemoryInfo = Electron.MemoryInfo;
|
|
25313
25379
|
type MemoryUsageDetails = Electron.MemoryUsageDetails;
|
|
25380
|
+
type MenuItemBadge = Electron.MenuItemBadge;
|
|
25314
25381
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
25315
25382
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
25316
25383
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
@@ -25723,6 +25790,7 @@ declare namespace Electron {
|
|
|
25723
25790
|
type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
|
|
25724
25791
|
type MemoryInfo = Electron.MemoryInfo;
|
|
25725
25792
|
type MemoryUsageDetails = Electron.MemoryUsageDetails;
|
|
25793
|
+
type MenuItemBadge = Electron.MenuItemBadge;
|
|
25726
25794
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
25727
25795
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
25728
25796
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
@@ -26059,6 +26127,7 @@ declare namespace Electron {
|
|
|
26059
26127
|
type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
|
|
26060
26128
|
type MemoryInfo = Electron.MemoryInfo;
|
|
26061
26129
|
type MemoryUsageDetails = Electron.MemoryUsageDetails;
|
|
26130
|
+
type MenuItemBadge = Electron.MenuItemBadge;
|
|
26062
26131
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
26063
26132
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
26064
26133
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
@@ -26394,6 +26463,7 @@ declare namespace Electron {
|
|
|
26394
26463
|
type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
|
|
26395
26464
|
type MemoryInfo = Electron.MemoryInfo;
|
|
26396
26465
|
type MemoryUsageDetails = Electron.MemoryUsageDetails;
|
|
26466
|
+
type MenuItemBadge = Electron.MenuItemBadge;
|
|
26397
26467
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
26398
26468
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
26399
26469
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
@@ -26825,6 +26895,7 @@ declare namespace Electron {
|
|
|
26825
26895
|
type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
|
|
26826
26896
|
type MemoryInfo = Electron.MemoryInfo;
|
|
26827
26897
|
type MemoryUsageDetails = Electron.MemoryUsageDetails;
|
|
26898
|
+
type MenuItemBadge = Electron.MenuItemBadge;
|
|
26828
26899
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
26829
26900
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
26830
26901
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
package/dist/version.json
CHANGED