electron-types 40.7.0 → 40.8.1

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 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.7.0
14
+ npm install -D electron-types@40.8.1
15
15
  # or
16
- yarn add -D electron-types@40.7.0
16
+ yarn add -D electron-types@40.8.1
17
17
  # or
18
- pnpm add -D electron-types@40.7.0
18
+ pnpm add -D electron-types@40.8.1
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 40.7.0
1
+ // Type definitions for Electron 40.8.1
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
@@ -10155,11 +10155,11 @@ declare namespace Electron {
10155
10155
  * notification from the action center but the `close` event will not be emitted
10156
10156
  * again.
10157
10157
  */
10158
- on(event: 'close', listener: (event: Event) => void): this;
10159
- off(event: 'close', listener: (event: Event) => void): this;
10160
- once(event: 'close', listener: (event: Event) => void): this;
10161
- addListener(event: 'close', listener: (event: Event) => void): this;
10162
- removeListener(event: 'close', listener: (event: Event) => void): this;
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;
10163
10163
  /**
10164
10164
  * Emitted when an error is encountered while creating and showing the native
10165
10165
  * notification.
@@ -11639,6 +11639,8 @@ declare namespace Electron {
11639
11639
  /**
11640
11640
  * The current absolute position of the mouse pointer.
11641
11641
  *
11642
+ * Not supported on Wayland (Linux).
11643
+ *
11642
11644
  * > [!NOTE] The return value is a DIP point, not a screen physical point.
11643
11645
  */
11644
11646
  getCursorScreenPoint(): Point;
@@ -21736,6 +21738,14 @@ declare namespace Electron {
21736
21738
  selectionIndex: number;
21737
21739
  }
21738
21740
 
21741
+ interface NotificationCloseEventParams {
21742
+ /**
21743
+ * The reason the notification was closed. This can be 'userCanceled',
21744
+ * 'applicationHidden', or 'timedOut'.
21745
+ */
21746
+ reason?: ('userCanceled' | 'applicationHidden' | 'timedOut');
21747
+ }
21748
+
21739
21749
  interface NotificationConstructorOptions {
21740
21750
  /**
21741
21751
  * A title for the notification, which will be displayed at the top of the
@@ -24235,6 +24245,7 @@ declare namespace Electron {
24235
24245
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
24236
24246
  type NativePixmap = Electron.NativePixmap;
24237
24247
  type NotificationActionEventParams = Electron.NotificationActionEventParams;
24248
+ type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
24238
24249
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
24239
24250
  type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
24240
24251
  type Offscreen = Electron.Offscreen;
@@ -24631,6 +24642,7 @@ declare namespace Electron {
24631
24642
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
24632
24643
  type NativePixmap = Electron.NativePixmap;
24633
24644
  type NotificationActionEventParams = Electron.NotificationActionEventParams;
24645
+ type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
24634
24646
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
24635
24647
  type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
24636
24648
  type Offscreen = Electron.Offscreen;
@@ -24955,6 +24967,7 @@ declare namespace Electron {
24955
24967
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
24956
24968
  type NativePixmap = Electron.NativePixmap;
24957
24969
  type NotificationActionEventParams = Electron.NotificationActionEventParams;
24970
+ type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
24958
24971
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
24959
24972
  type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
24960
24973
  type Offscreen = Electron.Offscreen;
@@ -25278,6 +25291,7 @@ declare namespace Electron {
25278
25291
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
25279
25292
  type NativePixmap = Electron.NativePixmap;
25280
25293
  type NotificationActionEventParams = Electron.NotificationActionEventParams;
25294
+ type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
25281
25295
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
25282
25296
  type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
25283
25297
  type Offscreen = Electron.Offscreen;
@@ -25695,6 +25709,7 @@ declare namespace Electron {
25695
25709
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
25696
25710
  type NativePixmap = Electron.NativePixmap;
25697
25711
  type NotificationActionEventParams = Electron.NotificationActionEventParams;
25712
+ type NotificationCloseEventParams = Electron.NotificationCloseEventParams;
25698
25713
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
25699
25714
  type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
25700
25715
  type Offscreen = Electron.Offscreen;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "40.7.0",
3
- "extractedAt": "2026-03-04T18:23:25.260Z"
2
+ "electronVersion": "40.8.1",
3
+ "extractedAt": "2026-03-12T18:26:09.943Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "40.7.0",
3
+ "version": "40.8.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",