electron-types 42.0.0-beta.1 → 42.0.0-beta.2
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 +17 -3
- 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@42.0.0-beta.
|
|
14
|
+
npm install -D electron-types@42.0.0-beta.2
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@42.0.0-beta.
|
|
16
|
+
yarn add -D electron-types@42.0.0-beta.2
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@42.0.0-beta.
|
|
18
|
+
pnpm add -D electron-types@42.0.0-beta.2
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 42.0.0-beta.
|
|
1
|
+
// Type definitions for Electron 42.0.0-beta.2
|
|
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
|
|
@@ -8405,6 +8405,10 @@ declare namespace Electron {
|
|
|
8405
8405
|
* don't want applications to fight for global shortcuts.
|
|
8406
8406
|
*/
|
|
8407
8407
|
isRegistered(accelerator: string): boolean;
|
|
8408
|
+
/**
|
|
8409
|
+
* Whether global shortcut handling is currently suspended.
|
|
8410
|
+
*/
|
|
8411
|
+
isSuspended(): boolean;
|
|
8408
8412
|
/**
|
|
8409
8413
|
* Whether or not the shortcut was registered successfully.
|
|
8410
8414
|
*
|
|
@@ -8442,6 +8446,17 @@ declare namespace Electron {
|
|
|
8442
8446
|
* * "Media Stop"
|
|
8443
8447
|
*/
|
|
8444
8448
|
registerAll(accelerators: string[], callback: () => void): void;
|
|
8449
|
+
/**
|
|
8450
|
+
* Suspends or resumes global shortcut handling. When suspended, all registered
|
|
8451
|
+
* global shortcuts will stop listening for key presses. When resumed, all
|
|
8452
|
+
* previously registered shortcuts will begin listening again. New shortcut
|
|
8453
|
+
* registrations will fail while handling is suspended.
|
|
8454
|
+
*
|
|
8455
|
+
* This can be useful when you want to temporarily allow the user to press key
|
|
8456
|
+
* combinations without your application intercepting them, for example while
|
|
8457
|
+
* displaying a UI to rebind shortcuts.
|
|
8458
|
+
*/
|
|
8459
|
+
setSuspended(suspended: boolean): void;
|
|
8445
8460
|
/**
|
|
8446
8461
|
* Unregisters the global shortcut of `accelerator`.
|
|
8447
8462
|
*/
|
|
@@ -9401,8 +9416,7 @@ declare namespace Electron {
|
|
|
9401
9416
|
* the additional effect of removing the menu bar from the window.
|
|
9402
9417
|
*
|
|
9403
9418
|
* > [!NOTE] The default menu will be created automatically if the app does not set
|
|
9404
|
-
* one. It contains standard items such as `File`, `Edit`, `View`, `Window
|
|
9405
|
-
* `Help`.
|
|
9419
|
+
* one. It contains standard items such as `File`, `Edit`, `View`, and `Window`.
|
|
9406
9420
|
*/
|
|
9407
9421
|
static setApplicationMenu(menu: (Menu) | (null)): void;
|
|
9408
9422
|
/**
|
package/dist/version.json
CHANGED