electron-types 40.1.0 → 40.2.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.1.0
14
+ npm install -D electron-types@40.2.1
15
15
  # or
16
- yarn add -D electron-types@40.1.0
16
+ yarn add -D electron-types@40.2.1
17
17
  # or
18
- pnpm add -D electron-types@40.1.0
18
+ pnpm add -D electron-types@40.2.1
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.2.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
@@ -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
  /**
@@ -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
  */
@@ -20765,6 +20782,11 @@ declare namespace Electron {
20765
20782
  }
20766
20783
 
20767
20784
  interface FeedURLOptions {
20785
+ /**
20786
+ * The update server URL. For _Windows_ MSIX, this can be either a direct link to
20787
+ * an MSIX file (e.g., `https://example.com/update.msix`) or a JSON endpoint that
20788
+ * returns update information (see the Squirrel.Mac README for more information).
20789
+ */
20768
20790
  url: string;
20769
20791
  /**
20770
20792
  * HTTP request headers.
@@ -20778,6 +20800,13 @@ declare namespace Electron {
20778
20800
  * @platform darwin
20779
20801
  */
20780
20802
  serverType?: ('json' | 'default');
20803
+ /**
20804
+ * If `true`, allows downgrades to older versions for MSIX packages. Defaults to
20805
+ * `false`.
20806
+ *
20807
+ * @platform win32
20808
+ */
20809
+ allowAnyVersion?: boolean;
20781
20810
  }
20782
20811
 
20783
20812
  interface FileIconOptions {
@@ -26046,8 +26075,8 @@ declare namespace NodeJS {
26046
26075
  */
26047
26076
  readonly type: ('browser' | 'renderer' | 'service-worker' | 'worker' | 'utility');
26048
26077
  /**
26049
- * A `boolean`. If the app is running as a Windows Store app (appx), this property
26050
- * is `true`, for otherwise it is `undefined`.
26078
+ * A `boolean`. If the app is running as an MSIX package (including AppX for
26079
+ * Windows Store), this property is `true`, otherwise it is `undefined`.
26051
26080
  *
26052
26081
  */
26053
26082
  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.2.1",
3
+ "extractedAt": "2026-02-06T06:27:38.457Z"
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.2.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",