electron-types 40.0.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.0.0
14
+ npm install -D electron-types@40.2.1
15
15
  # or
16
- yarn add -D electron-types@40.0.0
16
+ yarn add -D electron-types@40.2.1
17
17
  # or
18
- pnpm add -D electron-types@40.0.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.0.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
  */
@@ -13319,6 +13336,10 @@ declare namespace Electron {
13319
13336
  *
13320
13337
  * This moves a path to the OS-specific trash location (Trash on macOS, Recycle Bin
13321
13338
  * on Windows, and a desktop-environment-specific location on Linux).
13339
+ *
13340
+ * The path must use the default path separator for the platform (backslash on
13341
+ * Windows). Use `path.resolve()` from the `node:path` module to ensure correct
13342
+ * handling on all filesystems.
13322
13343
  */
13323
13344
  trashItem(path: string): Promise<void>;
13324
13345
  /**
@@ -17968,10 +17989,11 @@ declare namespace Electron {
17968
17989
  */
17969
17990
  frameRate: number;
17970
17991
  /**
17971
- * A `WebContents` instance that might own this `WebContents`.
17992
+ * A `WebContents | null` property that represents a `WebContents` instance that
17993
+ * might own this `WebContents`.
17972
17994
  *
17973
17995
  */
17974
- readonly hostWebContents: WebContents;
17996
+ readonly hostWebContents: (WebContents) | (null);
17975
17997
  /**
17976
17998
  * A `Integer` representing the unique ID of this WebContents. Each ID is unique
17977
17999
  * among all `WebContents` instances of the entire Electron application.
@@ -20760,6 +20782,11 @@ declare namespace Electron {
20760
20782
  }
20761
20783
 
20762
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
+ */
20763
20790
  url: string;
20764
20791
  /**
20765
20792
  * HTTP request headers.
@@ -20773,6 +20800,13 @@ declare namespace Electron {
20773
20800
  * @platform darwin
20774
20801
  */
20775
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;
20776
20810
  }
20777
20811
 
20778
20812
  interface FileIconOptions {
@@ -25988,11 +26022,11 @@ declare namespace NodeJS {
25988
26022
  */
25989
26023
  noAsar: boolean;
25990
26024
  /**
25991
- * A `boolean` that controls whether or not deprecation warnings are printed to
25992
- * `stderr`. Setting this to `true` will silence deprecation warnings. This
25993
- * property is used instead of the `--no-deprecation` command line flag.
26025
+ * A `boolean` (optional) that controls whether or not deprecation warnings are
26026
+ * printed to `stderr`. Setting this to `true` will silence deprecation warnings.
26027
+ * This property is used instead of the `--no-deprecation` command line flag.
25994
26028
  */
25995
- noDeprecation: boolean;
26029
+ noDeprecation?: boolean;
25996
26030
  /**
25997
26031
  * A `Electron.ParentPort` property if this is a `UtilityProcess` (or `null`
25998
26032
  * otherwise) allowing communication with the parent process.
@@ -26041,8 +26075,8 @@ declare namespace NodeJS {
26041
26075
  */
26042
26076
  readonly type: ('browser' | 'renderer' | 'service-worker' | 'worker' | 'utility');
26043
26077
  /**
26044
- * A `boolean`. If the app is running as a Windows Store app (appx), this property
26045
- * 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`.
26046
26080
  *
26047
26081
  */
26048
26082
  readonly windowsStore: boolean;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "40.0.0",
3
- "extractedAt": "2026-01-16T06:14:54.069Z"
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.0.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",