electron-types 40.6.1 → 40.7.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 +36 -19
- 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.7.0
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@40.
|
|
16
|
+
yarn add -D electron-types@40.7.0
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@40.
|
|
18
|
+
pnpm add -D electron-types@40.7.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.7.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
|
}
|
|
@@ -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.
|
|
@@ -21831,6 +21841,13 @@ declare namespace Electron {
|
|
|
21831
21841
|
* @experimental
|
|
21832
21842
|
*/
|
|
21833
21843
|
sharedTexturePixelFormat?: ('argb' | 'rgbaf16');
|
|
21844
|
+
/**
|
|
21845
|
+
* The device scale factor of the offscreen rendering output. If not set, will use
|
|
21846
|
+
* primary display's scale factor as default.
|
|
21847
|
+
*
|
|
21848
|
+
* @experimental
|
|
21849
|
+
*/
|
|
21850
|
+
deviceScaleFactor?: number;
|
|
21834
21851
|
}
|
|
21835
21852
|
|
|
21836
21853
|
interface OnBeforeRedirectListenerDetails {
|
|
@@ -23772,12 +23789,12 @@ declare namespace Electron {
|
|
|
23772
23789
|
*/
|
|
23773
23790
|
args: string[];
|
|
23774
23791
|
/**
|
|
23775
|
-
*
|
|
23792
|
+
* can be `user` or `machine`. Indicates whether the registry entry is under
|
|
23776
23793
|
* `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`.
|
|
23777
23794
|
*
|
|
23778
23795
|
* @platform win32
|
|
23779
23796
|
*/
|
|
23780
|
-
scope:
|
|
23797
|
+
scope: ('user' | 'machine');
|
|
23781
23798
|
/**
|
|
23782
23799
|
* `true` if the app registry key is startup approved and therefore shows as
|
|
23783
23800
|
* `enabled` in Task Manager and Windows settings.
|
package/dist/version.json
CHANGED