electron-types 39.2.6 → 40.0.0-alpha.2

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.
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 39.2.6
1
+ // Type definitions for Electron 40.0.0-alpha.2
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,10 +1042,8 @@ declare namespace Electron {
1042
1042
  */
1043
1043
  exit(exitCode?: number): void;
1044
1044
  /**
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).
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.
1049
1047
  *
1050
1048
  * You should seek to use the `steal` option as sparingly as possible.
1051
1049
  */
@@ -1372,7 +1370,7 @@ declare namespace Electron {
1372
1370
  */
1373
1371
  isEmojiPanelSupported(): boolean;
1374
1372
  /**
1375
- * whether hardware acceleration is currently enabled.
1373
+ * whether hardware acceleration is currently disabled.
1376
1374
  *
1377
1375
  * > [!NOTE] This information is only usable after the `gpu-info-update` event is
1378
1376
  * emitted.
@@ -3892,9 +3890,7 @@ declare namespace Electron {
3892
3890
  trafficLightPosition?: Point;
3893
3891
  /**
3894
3892
  * Makes the window transparent. Default is `false`. On Windows, does not work
3895
- * unless the window is frameless. When you add a `View` to a `BaseWindow`, you'll
3896
- * need to call `view.setBackgroundColor` with a transparent background color on
3897
- * that view to make its background transparent as well.
3893
+ * unless the window is frameless.
3898
3894
  */
3899
3895
  transparent?: boolean;
3900
3896
  /**
@@ -5271,8 +5267,6 @@ declare namespace Electron {
5271
5267
  addTabbedWindow(browserWindow: BrowserWindow): void;
5272
5268
  /**
5273
5269
  * Removes focus from the window.
5274
- *
5275
- * Not supported on Wayland (Linux).
5276
5270
  */
5277
5271
  blur(): void;
5278
5272
  blurWebView(): void;
@@ -5288,8 +5282,6 @@ declare namespace Electron {
5288
5282
  capturePage(rect?: Rectangle, opts?: Opts): Promise<Electron.NativeImage>;
5289
5283
  /**
5290
5284
  * Moves window to the center of the screen.
5291
- *
5292
- * Not supported on Wayland (Linux).
5293
5285
  */
5294
5286
  center(): void;
5295
5287
  /**
@@ -5316,9 +5308,6 @@ declare namespace Electron {
5316
5308
  flashFrame(flag: boolean): void;
5317
5309
  /**
5318
5310
  * Focuses on the window.
5319
- *
5320
- * On Wayland (Linux), the desktop environment may show a notification or flash the
5321
- * app icon if the window or app is not already focused.
5322
5311
  */
5323
5312
  focus(): void;
5324
5313
  focusOnWebView(): void;
@@ -5665,9 +5654,6 @@ declare namespace Electron {
5665
5654
  /**
5666
5655
  * the promise will resolve when the page has finished loading (see
5667
5656
  * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
5668
- * A noop rejection handler is already attached, which avoids unhandled rejection
5669
- * errors. If the existing page has a beforeUnload handler, `did-fail-load` will be
5670
- * called unless `will-prevent-unload` is handled.
5671
5657
  *
5672
5658
  * Same as `webContents.loadURL(url[, options])`.
5673
5659
  *
@@ -5712,9 +5698,7 @@ declare namespace Electron {
5712
5698
  */
5713
5699
  moveTabToNewWindow(): void;
5714
5700
  /**
5715
- * Moves window to top(z-order) regardless of focus.
5716
- *
5717
- * Not supported on Wayland (Linux).
5701
+ * Moves window to top(z-order) regardless of focus
5718
5702
  */
5719
5703
  moveTop(): void;
5720
5704
  /**
@@ -5876,8 +5860,6 @@ declare namespace Electron {
5876
5860
  * Resizes and moves the window to the supplied bounds. Any properties that are not
5877
5861
  * supplied will default to their current values.
5878
5862
  *
5879
- * On Wayland (Linux), has the same limitations as `setSize` and `setPosition`.
5880
- *
5881
5863
  * > [!NOTE] On macOS, the y-coordinate value cannot be smaller than the Tray
5882
5864
  * height. The tray height has changed over time and depends on the operating
5883
5865
  * system, but is between 20-40px. Passing a value lower than the tray height will
@@ -5901,9 +5883,6 @@ declare namespace Electron {
5901
5883
  /**
5902
5884
  * Resizes and moves the window's client area (e.g. the web page) to the supplied
5903
5885
  * bounds.
5904
- *
5905
- * On Wayland (Linux), has the same limitations as `setContentSize` and
5906
- * `setPosition`.
5907
5886
  */
5908
5887
  setContentBounds(bounds: Rectangle, animate?: boolean): void;
5909
5888
  /**
@@ -5924,9 +5903,6 @@ declare namespace Electron {
5924
5903
  setContentProtection(enable: boolean): void;
5925
5904
  /**
5926
5905
  * Resizes the window's client area (e.g. the web page) to `width` and `height`.
5927
- *
5928
- * On Wayland (Linux), may not work as some window managers restrict programmatic
5929
- * window resizing.
5930
5906
  */
5931
5907
  setContentSize(width: number, height: number, animate?: boolean): void;
5932
5908
  /**
@@ -6051,8 +6027,6 @@ declare namespace Electron {
6051
6027
  setParentWindow(parent: (BrowserWindow) | (null)): void;
6052
6028
  /**
6053
6029
  * Moves window to `x` and `y`.
6054
- *
6055
- * Not supported on Wayland (Linux).
6056
6030
  */
6057
6031
  setPosition(x: number, y: number, animate?: boolean): void;
6058
6032
  /**
@@ -6112,9 +6086,6 @@ declare namespace Electron {
6112
6086
  /**
6113
6087
  * Resizes the window to `width` and `height`. If `width` or `height` are below any
6114
6088
  * set minimum size constraints the window will snap to its minimum size.
6115
- *
6116
- * On Wayland (Linux), may not work as some window managers restrict programmatic
6117
- * window resizing.
6118
6089
  */
6119
6090
  setSize(width: number, height: number, animate?: boolean): void;
6120
6091
  /**
@@ -6260,8 +6231,6 @@ declare namespace Electron {
6260
6231
  showDefinitionForSelection(): void;
6261
6232
  /**
6262
6233
  * Shows the window but doesn't focus on it.
6263
- *
6264
- * Not supported on Wayland (Linux).
6265
6234
  */
6266
6235
  showInactive(): void;
6267
6236
  /**
@@ -9603,8 +9572,8 @@ declare namespace Electron {
9603
9572
  static createFromDataURL(dataURL: string): NativeImage;
9604
9573
  /**
9605
9574
  * Creates a new `NativeImage` instance from the `NSImage` that maps to the given
9606
- * image name. See Apple's `NSImageName` documentation and SF Symbols for a list of
9607
- * possible values.
9575
+ * image name. See Apple's `NSImageName` documentation for a list of possible
9576
+ * values.
9608
9577
  *
9609
9578
  * The `hslShift` is applied to the image with the following rules:
9610
9579
  *
@@ -9628,10 +9597,6 @@ declare namespace Electron {
9628
9597
  *
9629
9598
  * where `SYSTEM_IMAGE_NAME` should be replaced with any value from this list.
9630
9599
  *
9631
- * For SF Symbols, usage looks as follows:
9632
- *
9633
- * where `'square.and.pencil'` is the symbol name from the SF Symbols app.
9634
- *
9635
9600
  * @platform darwin
9636
9601
  */
9637
9602
  static createFromNamedImage(imageName: string, hslShift?: number[]): NativeImage;
@@ -11912,7 +11877,8 @@ declare namespace Electron {
11912
11877
  */
11913
11878
  static fromPath(path: string, options?: FromPathOptions): Session;
11914
11879
  /**
11915
- * A `Session` object, the default session object of the app.
11880
+ * A `Session` object, the default session object of the app, available after
11881
+ * `app.whenReady` is called.
11916
11882
  */
11917
11883
  static defaultSession: Session;
11918
11884
  /**
@@ -17446,8 +17412,7 @@ declare namespace Electron {
17446
17412
  * the promise will resolve when the page has finished loading (see
17447
17413
  * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
17448
17414
  * A noop rejection handler is already attached, which avoids unhandled rejection
17449
- * errors. If the existing page has a beforeUnload handler, `did-fail-load` will be
17450
- * called unless `will-prevent-unload` is handled.
17415
+ * errors.
17451
17416
  *
17452
17417
  * Loads the `url` in the window. The `url` must contain the protocol prefix, e.g.
17453
17418
  * the `http://` or `file://`. If the load should bypass http cache then use the
@@ -19749,13 +19714,6 @@ declare namespace Electron {
19749
19714
  * `session` is explicitly specified, `partition` is ignored.
19750
19715
  */
19751
19716
  partition?: string;
19752
- /**
19753
- * When set to `true`, custom protocol handlers registered for the request's URL
19754
- * scheme will not be called. This allows forwarding an intercepted request to the
19755
- * built-in handler. webRequest handlers will still be triggered when bypassing
19756
- * custom protocols. Defaults to `false`.
19757
- */
19758
- bypassCustomProtocolHandlers?: boolean;
19759
19717
  /**
19760
19718
  * Can be `include`, `omit` or `same-origin`. Whether to send credentials with this
19761
19719
  * request. If set to `include`, credentials from the session associated with the
@@ -21117,9 +21075,6 @@ declare namespace Electron {
21117
21075
  * An Accelerator string.
21118
21076
  */
21119
21077
  accelerator?: string;
21120
- /**
21121
- * Can be a NativeImage or the file path of an icon.
21122
- */
21123
21078
  icon?: (NativeImage) | (string);
21124
21079
  /**
21125
21080
  * If false, the menu item will be greyed out and unclickable.
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "39.2.6",
3
- "extractedAt": "2025-12-24T03:16:18.431Z"
2
+ "electronVersion": "40.0.0-alpha.2",
3
+ "extractedAt": "2025-12-24T03:16:03.830Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "39.2.6",
3
+ "version": "40.0.0-alpha.2",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",