electron-types 41.0.0-beta.7 → 41.0.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 +29 -6
- 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@41.0.0
|
|
14
|
+
npm install -D electron-types@41.0.0
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@41.0.0
|
|
16
|
+
yarn add -D electron-types@41.0.0
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@41.0.0
|
|
18
|
+
pnpm add -D electron-types@41.0.0
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 41.0.0
|
|
1
|
+
// Type definitions for Electron 41.0.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
|
|
@@ -10181,11 +10181,11 @@ declare namespace Electron {
|
|
|
10181
10181
|
* notification from the action center but the `close` event will not be emitted
|
|
10182
10182
|
* again.
|
|
10183
10183
|
*/
|
|
10184
|
-
on(event: 'close', listener: (
|
|
10185
|
-
off(event: 'close', listener: (
|
|
10186
|
-
once(event: 'close', listener: (
|
|
10187
|
-
addListener(event: 'close', listener: (
|
|
10188
|
-
removeListener(event: 'close', listener: (
|
|
10184
|
+
on(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10185
|
+
off(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10186
|
+
once(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10187
|
+
addListener(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10188
|
+
removeListener(event: 'close', listener: (details: Event<NotificationCloseEventParams>) => void): this;
|
|
10189
10189
|
/**
|
|
10190
10190
|
* Emitted when an error is encountered while creating and showing the native
|
|
10191
10191
|
* notification.
|
|
@@ -11665,6 +11665,8 @@ declare namespace Electron {
|
|
|
11665
11665
|
/**
|
|
11666
11666
|
* The current absolute position of the mouse pointer.
|
|
11667
11667
|
*
|
|
11668
|
+
* Not supported on Wayland (Linux).
|
|
11669
|
+
*
|
|
11668
11670
|
* > [!NOTE] The return value is a DIP point, not a screen physical point.
|
|
11669
11671
|
*/
|
|
11670
11672
|
getCursorScreenPoint(): Point;
|
|
@@ -17568,6 +17570,14 @@ declare namespace Electron {
|
|
|
17568
17570
|
* only valid for 10 seconds.
|
|
17569
17571
|
*/
|
|
17570
17572
|
getMediaSourceId(requestWebContents: WebContents): string;
|
|
17573
|
+
/**
|
|
17574
|
+
* The Chrome DevTools Protocol TargetID associated with this WebContents. This is
|
|
17575
|
+
* the reverse of `webContents.fromDevToolsTargetId()`.
|
|
17576
|
+
*
|
|
17577
|
+
* > [!NOTE] This method creates a new DevTools agent for this WebContents if one
|
|
17578
|
+
* does not already exist.
|
|
17579
|
+
*/
|
|
17580
|
+
getOrCreateDevToolsTargetId(): string;
|
|
17571
17581
|
/**
|
|
17572
17582
|
* The operating system `pid` of the associated renderer process.
|
|
17573
17583
|
*/
|
|
@@ -21765,6 +21775,14 @@ declare namespace Electron {
|
|
|
21765
21775
|
selectionIndex: number;
|
|
21766
21776
|
}
|
|
21767
21777
|
|
|
21778
|
+
interface NotificationCloseEventParams {
|
|
21779
|
+
/**
|
|
21780
|
+
* The reason the notification was closed. This can be 'userCanceled',
|
|
21781
|
+
* 'applicationHidden', or 'timedOut'.
|
|
21782
|
+
*/
|
|
21783
|
+
reason?: ('userCanceled' | 'applicationHidden' | 'timedOut');
|
|
21784
|
+
}
|
|
21785
|
+
|
|
21768
21786
|
interface NotificationConstructorOptions {
|
|
21769
21787
|
/**
|
|
21770
21788
|
* A title for the notification, which will be displayed at the top of the
|
|
@@ -24273,6 +24291,7 @@ declare namespace Electron {
|
|
|
24273
24291
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
24274
24292
|
type NativePixmap = Electron.NativePixmap;
|
|
24275
24293
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
24294
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
24276
24295
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
24277
24296
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
24278
24297
|
type Offscreen = Electron.Offscreen;
|
|
@@ -24669,6 +24688,7 @@ declare namespace Electron {
|
|
|
24669
24688
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
24670
24689
|
type NativePixmap = Electron.NativePixmap;
|
|
24671
24690
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
24691
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
24672
24692
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
24673
24693
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
24674
24694
|
type Offscreen = Electron.Offscreen;
|
|
@@ -24993,6 +25013,7 @@ declare namespace Electron {
|
|
|
24993
25013
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
24994
25014
|
type NativePixmap = Electron.NativePixmap;
|
|
24995
25015
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
25016
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
24996
25017
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
24997
25018
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
24998
25019
|
type Offscreen = Electron.Offscreen;
|
|
@@ -25316,6 +25337,7 @@ declare namespace Electron {
|
|
|
25316
25337
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
25317
25338
|
type NativePixmap = Electron.NativePixmap;
|
|
25318
25339
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
25340
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
25319
25341
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
25320
25342
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
25321
25343
|
type Offscreen = Electron.Offscreen;
|
|
@@ -25733,6 +25755,7 @@ declare namespace Electron {
|
|
|
25733
25755
|
type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
|
|
25734
25756
|
type NativePixmap = Electron.NativePixmap;
|
|
25735
25757
|
type NotificationActionEventParams = Electron.NotificationActionEventParams;
|
|
25758
|
+
type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
|
|
25736
25759
|
type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
|
|
25737
25760
|
type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
|
|
25738
25761
|
type Offscreen = Electron.Offscreen;
|
package/dist/version.json
CHANGED