electron-types 40.1.0 → 40.3.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 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.1.0
14
+ npm install -D electron-types@40.3.0
15
15
  # or
16
- yarn add -D electron-types@40.1.0
16
+ yarn add -D electron-types@40.3.0
17
17
  # or
18
- pnpm add -D electron-types@40.1.0
18
+ pnpm add -D electron-types@40.3.0
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 40.1.0
1
+ // Type definitions for Electron 40.3.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
@@ -1149,6 +1149,9 @@ declare namespace Electron {
1149
1149
  *
1150
1150
  * Using `basic` should be preferred if only basic information like `vendorId` or
1151
1151
  * `deviceId` is needed.
1152
+ *
1153
+ * Promise is rejected if the GPU is completely disabled, i.e. no hardware and
1154
+ * software implementations are available.
1152
1155
  */
1153
1156
  getGPUInfo(infoType: 'basic' | 'complete'): Promise<unknown>;
1154
1157
  /**
@@ -1940,7 +1943,7 @@ declare namespace Electron {
1940
1943
  /**
1941
1944
  * Emitted when an update has been downloaded.
1942
1945
  *
1943
- * On Windows only `releaseName` is available.
1946
+ * With Squirrel.Windows only `releaseName` is available.
1944
1947
  *
1945
1948
  * > [!NOTE] It is not strictly necessary to handle this event. A successfully
1946
1949
  * downloaded update will still be applied the next time the application starts.
@@ -2662,6 +2665,10 @@ declare namespace Electron {
2662
2665
  * height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
2663
2666
  * 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
2664
2667
  * 25, y: 38, width: 800, height: 600 }`.
2668
+ *
2669
+ * > [!NOTE] On Wayland, this method will return `{ x: 0, y: 0, ... }` as
2670
+ * introspecting or programmatically changing the global window coordinates is
2671
+ * prohibited.
2665
2672
  */
2666
2673
  getBounds(): Rectangle;
2667
2674
  /**
@@ -2725,6 +2732,9 @@ declare namespace Electron {
2725
2732
  getParentWindow(): (BaseWindow) | (null);
2726
2733
  /**
2727
2734
  * Contains the window's current position.
2735
+ *
2736
+ * > [!NOTE] On Wayland, this method will return `[0, 0]` as introspecting or
2737
+ * programmatically changing the global window coordinates is prohibited.
2728
2738
  */
2729
2739
  getPosition(): number[];
2730
2740
  /**
@@ -5341,6 +5351,10 @@ declare namespace Electron {
5341
5351
  * height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
5342
5352
  * 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
5343
5353
  * 25, y: 38, width: 800, height: 600 }`.
5354
+ *
5355
+ * > [!NOTE] On Wayland, this method will return `{ x: 0, y: 0, ... }` as
5356
+ * introspecting or programmatically changing the global window coordinates is
5357
+ * prohibited.
5344
5358
  */
5345
5359
  getBounds(): Rectangle;
5346
5360
  /**
@@ -5423,6 +5437,9 @@ declare namespace Electron {
5423
5437
  getParentWindow(): (BrowserWindow) | (null);
5424
5438
  /**
5425
5439
  * Contains the window's current position.
5440
+ *
5441
+ * > [!NOTE] On Wayland, this method will return `[0, 0]` as introspecting or
5442
+ * programmatically changing the global window coordinates is prohibited.
5426
5443
  */
5427
5444
  getPosition(): number[];
5428
5445
  /**
@@ -9325,9 +9342,9 @@ declare namespace Electron {
9325
9342
  */
9326
9343
  constructor(options: MenuItemConstructorOptions);
9327
9344
  /**
9328
- * An `Accelerator` (optional) indicating the item's accelerator, if set.
9345
+ * An `Accelerator | null` indicating the item's accelerator, if set.
9329
9346
  */
9330
- accelerator?: Accelerator;
9347
+ accelerator: (Accelerator) | (null);
9331
9348
  /**
9332
9349
  * A `boolean` indicating whether the item is checked. This property can be
9333
9350
  * dynamically changed.
@@ -13155,7 +13172,7 @@ declare namespace Electron {
13155
13172
  /**
13156
13173
  * The pixel format of the texture.
13157
13174
  */
13158
- pixelFormat: ('bgra' | 'rgba' | 'rgbaf16');
13175
+ pixelFormat: ('bgra' | 'rgba' | 'rgbaf16' | 'nv12');
13159
13176
  /**
13160
13177
  * A timestamp in microseconds that will be reflected to `VideoFrame`.
13161
13178
  */
@@ -17819,7 +17836,8 @@ declare namespace Electron {
17819
17836
  setDevToolsWebContents(devToolsWebContents: WebContents): void;
17820
17837
  /**
17821
17838
  * If _offscreen rendering_ is enabled sets the frame rate to the specified number.
17822
- * Only values between 1 and 240 are accepted.
17839
+ * When `webPreferences.offscreen.useSharedTexture` is `false` only values between
17840
+ * 1 and 240 are accepted.
17823
17841
  */
17824
17842
  setFrameRate(fps: number): void;
17825
17843
  /**
@@ -20765,6 +20783,11 @@ declare namespace Electron {
20765
20783
  }
20766
20784
 
20767
20785
  interface FeedURLOptions {
20786
+ /**
20787
+ * The update server URL. For _Windows_ MSIX, this can be either a direct link to
20788
+ * an MSIX file (e.g., `https://example.com/update.msix`) or a JSON endpoint that
20789
+ * returns update information (see the Squirrel.Mac README for more information).
20790
+ */
20768
20791
  url: string;
20769
20792
  /**
20770
20793
  * HTTP request headers.
@@ -20778,6 +20801,13 @@ declare namespace Electron {
20778
20801
  * @platform darwin
20779
20802
  */
20780
20803
  serverType?: ('json' | 'default');
20804
+ /**
20805
+ * If `true`, allows downgrades to older versions for MSIX packages. Defaults to
20806
+ * `false`.
20807
+ *
20808
+ * @platform win32
20809
+ */
20810
+ allowAnyVersion?: boolean;
20781
20811
  }
20782
20812
 
20783
20813
  interface FileIconOptions {
@@ -26046,8 +26076,8 @@ declare namespace NodeJS {
26046
26076
  */
26047
26077
  readonly type: ('browser' | 'renderer' | 'service-worker' | 'worker' | 'utility');
26048
26078
  /**
26049
- * A `boolean`. If the app is running as a Windows Store app (appx), this property
26050
- * is `true`, for otherwise it is `undefined`.
26079
+ * A `boolean`. If the app is running as an MSIX package (including AppX for
26080
+ * Windows Store), this property is `true`, otherwise it is `undefined`.
26051
26081
  *
26052
26082
  */
26053
26083
  readonly windowsStore: boolean;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "40.1.0",
3
- "extractedAt": "2026-01-29T12:21:02.937Z"
2
+ "electronVersion": "40.3.0",
3
+ "extractedAt": "2026-02-11T06:34:39.403Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "40.1.0",
3
+ "version": "40.3.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",