electron-types 40.6.1 → 40.8.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 +54 -24
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
|
|
|
11
11
|
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)):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install -D electron-types@40.
|
|
14
|
+
npm install -D electron-types@40.8.0
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@40.
|
|
16
|
+
yarn add -D electron-types@40.8.0
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@40.
|
|
18
|
+
pnpm add -D electron-types@40.8.0
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 40.
|
|
1
|
+
// Type definitions for Electron 40.8.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
|
|
@@ -1211,7 +1211,7 @@ declare namespace Electron {
|
|
|
1211
1211
|
* indicates that the app should restore the windows that were open the last time
|
|
1212
1212
|
* the app was closed. This setting is not available on MAS builds or on macOS 13
|
|
1213
1213
|
* and up.
|
|
1214
|
-
* * `status` string _macOS_ - can be
|
|
1214
|
+
* * `status` string _macOS_ - can be `not-registered`, `enabled`,
|
|
1215
1215
|
* `requires-approval`, or `not-found`.
|
|
1216
1216
|
* * `executableWillLaunchAtLogin` boolean _Windows_ - `true` if app is set to open
|
|
1217
1217
|
* at login and its run key is not deactivated. This differs from `openAtLogin` as
|
|
@@ -1223,7 +1223,7 @@ declare namespace Electron {
|
|
|
1223
1223
|
* registry entry.
|
|
1224
1224
|
* * `args` string[] _Windows_ - the command-line arguments to pass to the
|
|
1225
1225
|
* executable.
|
|
1226
|
-
* * `scope` string _Windows_ -
|
|
1226
|
+
* * `scope` string _Windows_ - can be `user` or `machine`. Indicates whether the
|
|
1227
1227
|
* registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`.
|
|
1228
1228
|
* * `enabled` boolean _Windows_ - `true` if the app registry key is startup
|
|
1229
1229
|
* approved and therefore shows as `enabled` in Task Manager and Windows settings.
|
|
@@ -9390,8 +9390,9 @@ declare namespace Electron {
|
|
|
9390
9390
|
*/
|
|
9391
9391
|
accelerator: (Accelerator) | (null);
|
|
9392
9392
|
/**
|
|
9393
|
-
* A `boolean` indicating whether the item is checked.
|
|
9394
|
-
*
|
|
9393
|
+
* A `boolean` indicating whether the item is checked.
|
|
9394
|
+
*
|
|
9395
|
+
* This property can be dynamically changed.
|
|
9395
9396
|
*
|
|
9396
9397
|
* A `checkbox` menu item will toggle the `checked` property on and off when
|
|
9397
9398
|
* selected.
|
|
@@ -9416,21 +9417,27 @@ declare namespace Electron {
|
|
|
9416
9417
|
*/
|
|
9417
9418
|
commandId: number;
|
|
9418
9419
|
/**
|
|
9419
|
-
* A `boolean` indicating whether the item is enabled.
|
|
9420
|
-
*
|
|
9420
|
+
* A `boolean` indicating whether the item is enabled.
|
|
9421
|
+
*
|
|
9422
|
+
* This property can be dynamically changed.
|
|
9421
9423
|
*/
|
|
9422
9424
|
enabled: boolean;
|
|
9423
9425
|
/**
|
|
9424
9426
|
* A `NativeImage | string` (optional) indicating the item's icon, if set.
|
|
9427
|
+
*
|
|
9428
|
+
* This property can be dynamically changed.
|
|
9425
9429
|
*/
|
|
9426
9430
|
icon?: (NativeImage) | (string);
|
|
9427
9431
|
/**
|
|
9428
|
-
* A `string` indicating the item's unique id.
|
|
9429
|
-
*
|
|
9432
|
+
* A `string` indicating the item's unique id.
|
|
9433
|
+
*
|
|
9434
|
+
* This property can be dynamically changed.
|
|
9430
9435
|
*/
|
|
9431
9436
|
id: string;
|
|
9432
9437
|
/**
|
|
9433
9438
|
* A `string` indicating the item's visible label.
|
|
9439
|
+
*
|
|
9440
|
+
* This property can be dynamically changed.
|
|
9434
9441
|
*/
|
|
9435
9442
|
label: string;
|
|
9436
9443
|
/**
|
|
@@ -9466,6 +9473,8 @@ declare namespace Electron {
|
|
|
9466
9473
|
sharingItem: SharingItem;
|
|
9467
9474
|
/**
|
|
9468
9475
|
* A `string` indicating the item's sublabel.
|
|
9476
|
+
*
|
|
9477
|
+
* This property can be dynamically changed.
|
|
9469
9478
|
*/
|
|
9470
9479
|
sublabel: string;
|
|
9471
9480
|
/**
|
|
@@ -9498,8 +9507,9 @@ declare namespace Electron {
|
|
|
9498
9507
|
*/
|
|
9499
9508
|
readonly userAccelerator: (Accelerator) | (null);
|
|
9500
9509
|
/**
|
|
9501
|
-
* A `boolean` indicating whether the item is visible.
|
|
9502
|
-
*
|
|
9510
|
+
* A `boolean` indicating whether the item is visible.
|
|
9511
|
+
*
|
|
9512
|
+
* This property can be dynamically changed.
|
|
9503
9513
|
*/
|
|
9504
9514
|
visible: boolean;
|
|
9505
9515
|
}
|
|
@@ -10145,11 +10155,11 @@ declare namespace Electron {
|
|
|
10145
10155
|
* notification from the action center but the `close` event will not be emitted
|
|
10146
10156
|
* again.
|
|
10147
10157
|
*/
|
|
10148
|
-
on(event: 'close', listener: (
|
|
10149
|
-
off(event: 'close', listener: (
|
|
10150
|
-
once(event: 'close', listener: (
|
|
10151
|
-
addListener(event: 'close', listener: (
|
|
10152
|
-
removeListener(event: 'close', listener: (
|
|
10158
|
+
on(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10159
|
+
off(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10160
|
+
once(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10161
|
+
addListener(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10162
|
+
removeListener(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10153
10163
|
/**
|
|
10154
10164
|
* Emitted when an error is encountered while creating and showing the native
|
|
10155
10165
|
* notification.
|
|
@@ -21345,11 +21355,11 @@ declare namespace Electron {
|
|
|
21345
21355
|
*/
|
|
21346
21356
|
restoreState: boolean;
|
|
21347
21357
|
/**
|
|
21348
|
-
* can be
|
|
21358
|
+
* can be `not-registered`, `enabled`, `requires-approval`, or `not-found`.
|
|
21349
21359
|
*
|
|
21350
21360
|
* @platform darwin
|
|
21351
21361
|
*/
|
|
21352
|
-
status:
|
|
21362
|
+
status: ('not-registered' | 'enabled' | 'requires-approval' | 'not-found');
|
|
21353
21363
|
/**
|
|
21354
21364
|
* `true` if app is set to open at login and its run key is not deactivated. This
|
|
21355
21365
|
* differs from `openAtLogin` as it ignores the `args` option, this property will
|
|
@@ -21364,13 +21374,13 @@ declare namespace Electron {
|
|
|
21364
21374
|
|
|
21365
21375
|
interface LoginItemSettingsOptions {
|
|
21366
21376
|
/**
|
|
21367
|
-
* Can be
|
|
21368
|
-
*
|
|
21369
|
-
*
|
|
21377
|
+
* Can be `mainAppService`, `agentService`, `daemonService`, or `loginItemService`.
|
|
21378
|
+
* Defaults to `mainAppService`. Only available on macOS 13 and up. See
|
|
21379
|
+
* app.setLoginItemSettings for more information about each type.
|
|
21370
21380
|
*
|
|
21371
21381
|
* @platform darwin
|
|
21372
21382
|
*/
|
|
21373
|
-
type?:
|
|
21383
|
+
type?: ('mainAppService' | 'agentService' | 'daemonService' | 'loginItemService');
|
|
21374
21384
|
/**
|
|
21375
21385
|
* The name of the service. Required if `type` is non-default. Only available on
|
|
21376
21386
|
* macOS 13 and up.
|
|
@@ -21726,6 +21736,14 @@ declare namespace Electron {
|
|
|
21726
21736
|
selectionIndex: number;
|
|
21727
21737
|
}
|
|
21728
21738
|
|
|
21739
|
+
interface NotificationCloseEventParams {
|
|
21740
|
+
/**
|
|
21741
|
+
* The reason the notification was closed. This can be 'userCanceled',
|
|
21742
|
+
* 'applicationHidden', or 'timedOut'.
|
|
21743
|
+
*/
|
|
21744
|
+
reason?: ('userCanceled' | 'applicationHidden' | 'timedOut');
|
|
21745
|
+
}
|
|
21746
|
+
|
|
21729
21747
|
interface NotificationConstructorOptions {
|
|
21730
21748
|
/**
|
|
21731
21749
|
* A title for the notification, which will be displayed at the top of the
|
|
@@ -21831,6 +21849,13 @@ declare namespace Electron {
|
|
|
21831
21849
|
* @experimental
|
|
21832
21850
|
*/
|
|
21833
21851
|
sharedTexturePixelFormat?: ('argb' | 'rgbaf16');
|
|
21852
|
+
/**
|
|
21853
|
+
* The device scale factor of the offscreen rendering output. If not set, will use
|
|
21854
|
+
* primary display's scale factor as default.
|
|
21855
|
+
*
|
|
21856
|
+
* @experimental
|
|
21857
|
+
*/
|
|
21858
|
+
deviceScaleFactor?: number;
|
|
21834
21859
|
}
|
|
21835
21860
|
|
|
21836
21861
|
interface OnBeforeRedirectListenerDetails {
|
|
@@ -23772,12 +23797,12 @@ declare namespace Electron {
|
|
|
23772
23797
|
*/
|
|
23773
23798
|
args: string[];
|
|
23774
23799
|
/**
|
|
23775
|
-
*
|
|
23800
|
+
* can be `user` or `machine`. Indicates whether the registry entry is under
|
|
23776
23801
|
* `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`.
|
|
23777
23802
|
*
|
|
23778
23803
|
* @platform win32
|
|
23779
23804
|
*/
|
|
23780
|
-
scope:
|
|
23805
|
+
scope: ('user' | 'machine');
|
|
23781
23806
|
/**
|
|
23782
23807
|
* `true` if the app registry key is startup approved and therefore shows as
|
|
23783
23808
|
* `enabled` in Task Manager and Windows settings.
|
|
@@ -24218,6 +24243,7 @@ declare namespace Electron {
|
|
|
24218
24243
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
24219
24244
|
type NativePixmap = Electron.NativePixmap;
|
|
24220
24245
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
24246
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
24221
24247
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
24222
24248
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
24223
24249
|
type Offscreen = Electron.Offscreen;
|
|
@@ -24614,6 +24640,7 @@ declare namespace Electron {
|
|
|
24614
24640
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
24615
24641
|
type NativePixmap = Electron.NativePixmap;
|
|
24616
24642
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
24643
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
24617
24644
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
24618
24645
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
24619
24646
|
type Offscreen = Electron.Offscreen;
|
|
@@ -24938,6 +24965,7 @@ declare namespace Electron {
|
|
|
24938
24965
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
24939
24966
|
type NativePixmap = Electron.NativePixmap;
|
|
24940
24967
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
24968
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
24941
24969
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
24942
24970
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
24943
24971
|
type Offscreen = Electron.Offscreen;
|
|
@@ -25261,6 +25289,7 @@ declare namespace Electron {
|
|
|
25261
25289
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
25262
25290
|
type NativePixmap = Electron.NativePixmap;
|
|
25263
25291
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
25292
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
25264
25293
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
25265
25294
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
25266
25295
|
type Offscreen = Electron.Offscreen;
|
|
@@ -25678,6 +25707,7 @@ declare namespace Electron {
|
|
|
25678
25707
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
25679
25708
|
type NativePixmap = Electron.NativePixmap;
|
|
25680
25709
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
25710
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
25681
25711
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
25682
25712
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
25683
25713
|
type Offscreen = Electron.Offscreen;
|
package/dist/version.json
CHANGED