electron-types 40.0.0-beta.9 → 41.0.0-alpha.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-beta.9
14
+ npm install -D electron-types@41.0.0-alpha.1
15
15
  # or
16
- yarn add -D electron-types@40.0.0-beta.9
16
+ yarn add -D electron-types@41.0.0-alpha.1
17
17
  # or
18
- pnpm add -D electron-types@40.0.0-beta.9
18
+ pnpm add -D electron-types@41.0.0-alpha.1
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 40.0.0-beta.9
1
+ // Type definitions for Electron 41.0.0-alpha.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
@@ -1042,8 +1042,10 @@ declare namespace Electron {
1042
1042
  */
1043
1043
  exit(exitCode?: number): void;
1044
1044
  /**
1045
- * On Linux, focuses on the first visible window. On macOS, makes the application
1046
- * the active app. On Windows, focuses on the application's first window.
1045
+ * On macOS, makes the application the active app. On Windows, focuses on the
1046
+ * application's first window. On Linux, either focuses on the first visible window
1047
+ * (X11) or requests focus but may instead show a notification or flash the app
1048
+ * icon (Wayland).
1047
1049
  *
1048
1050
  * You should seek to use the `steal` option as sparingly as possible.
1049
1051
  */
@@ -5268,6 +5270,8 @@ declare namespace Electron {
5268
5270
  addTabbedWindow(browserWindow: BrowserWindow): void;
5269
5271
  /**
5270
5272
  * Removes focus from the window.
5273
+ *
5274
+ * Not supported on Wayland (Linux).
5271
5275
  */
5272
5276
  blur(): void;
5273
5277
  blurWebView(): void;
@@ -5283,6 +5287,8 @@ declare namespace Electron {
5283
5287
  capturePage(rect?: Rectangle, opts?: Opts): Promise<Electron.NativeImage>;
5284
5288
  /**
5285
5289
  * Moves window to the center of the screen.
5290
+ *
5291
+ * Not supported on Wayland (Linux).
5286
5292
  */
5287
5293
  center(): void;
5288
5294
  /**
@@ -5309,6 +5315,9 @@ declare namespace Electron {
5309
5315
  flashFrame(flag: boolean): void;
5310
5316
  /**
5311
5317
  * Focuses on the window.
5318
+ *
5319
+ * On Wayland (Linux), the desktop environment may show a notification or flash the
5320
+ * app icon if the window or app is not already focused.
5312
5321
  */
5313
5322
  focus(): void;
5314
5323
  focusOnWebView(): void;
@@ -5702,7 +5711,9 @@ declare namespace Electron {
5702
5711
  */
5703
5712
  moveTabToNewWindow(): void;
5704
5713
  /**
5705
- * Moves window to top(z-order) regardless of focus
5714
+ * Moves window to top(z-order) regardless of focus.
5715
+ *
5716
+ * Not supported on Wayland (Linux).
5706
5717
  */
5707
5718
  moveTop(): void;
5708
5719
  /**
@@ -5864,6 +5875,8 @@ declare namespace Electron {
5864
5875
  * Resizes and moves the window to the supplied bounds. Any properties that are not
5865
5876
  * supplied will default to their current values.
5866
5877
  *
5878
+ * On Wayland (Linux), has the same limitations as `setSize` and `setPosition`.
5879
+ *
5867
5880
  * > [!NOTE] On macOS, the y-coordinate value cannot be smaller than the Tray
5868
5881
  * height. The tray height has changed over time and depends on the operating
5869
5882
  * system, but is between 20-40px. Passing a value lower than the tray height will
@@ -5887,6 +5900,9 @@ declare namespace Electron {
5887
5900
  /**
5888
5901
  * Resizes and moves the window's client area (e.g. the web page) to the supplied
5889
5902
  * bounds.
5903
+ *
5904
+ * On Wayland (Linux), has the same limitations as `setContentSize` and
5905
+ * `setPosition`.
5890
5906
  */
5891
5907
  setContentBounds(bounds: Rectangle, animate?: boolean): void;
5892
5908
  /**
@@ -5907,6 +5923,9 @@ declare namespace Electron {
5907
5923
  setContentProtection(enable: boolean): void;
5908
5924
  /**
5909
5925
  * Resizes the window's client area (e.g. the web page) to `width` and `height`.
5926
+ *
5927
+ * On Wayland (Linux), may not work as some window managers restrict programmatic
5928
+ * window resizing.
5910
5929
  */
5911
5930
  setContentSize(width: number, height: number, animate?: boolean): void;
5912
5931
  /**
@@ -6031,6 +6050,8 @@ declare namespace Electron {
6031
6050
  setParentWindow(parent: (BrowserWindow) | (null)): void;
6032
6051
  /**
6033
6052
  * Moves window to `x` and `y`.
6053
+ *
6054
+ * Not supported on Wayland (Linux).
6034
6055
  */
6035
6056
  setPosition(x: number, y: number, animate?: boolean): void;
6036
6057
  /**
@@ -6090,6 +6111,9 @@ declare namespace Electron {
6090
6111
  /**
6091
6112
  * Resizes the window to `width` and `height`. If `width` or `height` are below any
6092
6113
  * set minimum size constraints the window will snap to its minimum size.
6114
+ *
6115
+ * On Wayland (Linux), may not work as some window managers restrict programmatic
6116
+ * window resizing.
6093
6117
  */
6094
6118
  setSize(width: number, height: number, animate?: boolean): void;
6095
6119
  /**
@@ -6235,6 +6259,8 @@ declare namespace Electron {
6235
6259
  showDefinitionForSelection(): void;
6236
6260
  /**
6237
6261
  * Shows the window but doesn't focus on it.
6262
+ *
6263
+ * Not supported on Wayland (Linux).
6238
6264
  */
6239
6265
  showInactive(): void;
6240
6266
  /**
@@ -13155,7 +13181,7 @@ declare namespace Electron {
13155
13181
  /**
13156
13182
  * The pixel format of the texture.
13157
13183
  */
13158
- pixelFormat: ('bgra' | 'rgba' | 'rgbaf16');
13184
+ pixelFormat: ('bgra' | 'rgba' | 'rgbaf16' | 'nv12');
13159
13185
  /**
13160
13186
  * A timestamp in microseconds that will be reflected to `VideoFrame`.
13161
13187
  */
@@ -17968,10 +17994,11 @@ declare namespace Electron {
17968
17994
  */
17969
17995
  frameRate: number;
17970
17996
  /**
17971
- * A `WebContents` instance that might own this `WebContents`.
17997
+ * A `WebContents | null` property that represents a `WebContents` instance that
17998
+ * might own this `WebContents`.
17972
17999
  *
17973
18000
  */
17974
- readonly hostWebContents: WebContents;
18001
+ readonly hostWebContents: (WebContents) | (null);
17975
18002
  /**
17976
18003
  * A `Integer` representing the unique ID of this WebContents. Each ID is unique
17977
18004
  * among all `WebContents` instances of the entire Electron application.
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "40.0.0-beta.9",
3
- "extractedAt": "2026-01-15T00:36:45.782Z"
2
+ "electronVersion": "41.0.0-alpha.1",
3
+ "extractedAt": "2026-01-20T06:16:06.539Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "40.0.0-beta.9",
3
+ "version": "41.0.0-alpha.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",