electron-types 41.0.0-alpha.5 → 41.0.0-beta.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@41.0.0-alpha.5
14
+ npm install -D electron-types@41.0.0-beta.1
15
15
  # or
16
- yarn add -D electron-types@41.0.0-alpha.5
16
+ yarn add -D electron-types@41.0.0-beta.1
17
17
  # or
18
- pnpm add -D electron-types@41.0.0-alpha.5
18
+ pnpm add -D electron-types@41.0.0-beta.1
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 41.0.0-alpha.5
1
+ // Type definitions for Electron 41.0.0-beta.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
@@ -1014,7 +1014,7 @@ declare namespace Electron {
1014
1014
  configureHostResolver(options: ConfigureHostResolverOptions): void;
1015
1015
  /**
1016
1016
  * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain
1017
- * basis if the GPU processes crashes too frequently. This function disables that
1017
+ * basis if the GPU process crashes too frequently. This function disables that
1018
1018
  * behavior.
1019
1019
  *
1020
1020
  * This method can only be called before app is ready.
@@ -1124,7 +1124,7 @@ declare namespace Electron {
1124
1124
  *
1125
1125
  * Fetches a path's associated icon.
1126
1126
  *
1127
- * On _Windows_, there a 2 kinds of icons:
1127
+ * On _Windows_, there are 2 kinds of icons:
1128
1128
  *
1129
1129
  * * Icons associated with certain file extensions, like `.mp3`, `.png`, etc.
1130
1130
  * * Icons inside the file itself, like `.exe`, `.dll`, `.ico`.
@@ -1244,7 +1244,7 @@ declare namespace Electron {
1244
1244
  * A path to a special directory or file associated with `name`. On failure, an
1245
1245
  * `Error` is thrown.
1246
1246
  *
1247
- * If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being
1247
+ * If `app.getPath('logs')` is called without calling `app.setAppLogsPath()` being
1248
1248
  * called first, a default log directory will be created equivalent to calling
1249
1249
  * `app.setAppLogsPath()` without a `path` parameter.
1250
1250
  */
@@ -1280,7 +1280,7 @@ declare namespace Electron {
1280
1280
  * preferred system language has no country code, and that one of the preferred
1281
1281
  * system languages corresponds with the language used for the regional format. On
1282
1282
  * macOS, the region serves more as a default country code: the user doesn't need
1283
- * to have Finnish as a preferred language to use Finland as the region,and the
1283
+ * to have Finnish as a preferred language to use Finland as the region, and the
1284
1284
  * country code `FI` is used as the country code for preferred system languages
1285
1285
  * that do not have associated countries in the language name.
1286
1286
  */
@@ -2667,6 +2667,10 @@ declare namespace Electron {
2667
2667
  * height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
2668
2668
  * 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
2669
2669
  * 25, y: 38, width: 800, height: 600 }`.
2670
+ *
2671
+ * > [!NOTE] On Wayland, this method will return `{ x: 0, y: 0, ... }` as
2672
+ * introspecting or programmatically changing the global window coordinates is
2673
+ * prohibited.
2670
2674
  */
2671
2675
  getBounds(): Rectangle;
2672
2676
  /**
@@ -2730,6 +2734,9 @@ declare namespace Electron {
2730
2734
  getParentWindow(): (BaseWindow) | (null);
2731
2735
  /**
2732
2736
  * Contains the window's current position.
2737
+ *
2738
+ * > [!NOTE] On Wayland, this method will return `[0, 0]` as introspecting or
2739
+ * programmatically changing the global window coordinates is prohibited.
2733
2740
  */
2734
2741
  getPosition(): number[];
2735
2742
  /**
@@ -2923,7 +2930,7 @@ declare namespace Electron {
2923
2930
  * hiding titlebar buttons.
2924
2931
  *
2925
2932
  * This API returns whether the window is in tablet mode, and the `resize` event
2926
- * can be be used to listen to changes to tablet mode.
2933
+ * can be used to listen to changes to tablet mode.
2927
2934
  *
2928
2935
  * @platform win32
2929
2936
  */
@@ -5353,6 +5360,10 @@ declare namespace Electron {
5353
5360
  * height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
5354
5361
  * 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
5355
5362
  * 25, y: 38, width: 800, height: 600 }`.
5363
+ *
5364
+ * > [!NOTE] On Wayland, this method will return `{ x: 0, y: 0, ... }` as
5365
+ * introspecting or programmatically changing the global window coordinates is
5366
+ * prohibited.
5356
5367
  */
5357
5368
  getBounds(): Rectangle;
5358
5369
  /**
@@ -5435,6 +5446,9 @@ declare namespace Electron {
5435
5446
  getParentWindow(): (BrowserWindow) | (null);
5436
5447
  /**
5437
5448
  * Contains the window's current position.
5449
+ *
5450
+ * > [!NOTE] On Wayland, this method will return `[0, 0]` as introspecting or
5451
+ * programmatically changing the global window coordinates is prohibited.
5438
5452
  */
5439
5453
  getPosition(): number[];
5440
5454
  /**
@@ -5632,7 +5646,7 @@ declare namespace Electron {
5632
5646
  * hiding titlebar buttons.
5633
5647
  *
5634
5648
  * This API returns whether the window is in tablet mode, and the `resize` event
5635
- * can be be used to listen to changes to tablet mode.
5649
+ * can be used to listen to changes to tablet mode.
5636
5650
  *
5637
5651
  * @platform win32
5638
5652
  */
@@ -6686,7 +6700,7 @@ declare namespace Electron {
6686
6700
  * Cancels an ongoing HTTP transaction. If the request has already emitted the
6687
6701
  * `close` event, the abort operation will have no effect. Otherwise an ongoing
6688
6702
  * event will emit `abort` and `close` events. Additionally, if there is an ongoing
6689
- * response object,it will emit the `aborted` event.
6703
+ * response object, it will emit the `aborted` event.
6690
6704
  */
6691
6705
  abort(): void;
6692
6706
  /**
@@ -7094,7 +7108,7 @@ declare namespace Electron {
7094
7108
  /**
7095
7109
  * The cause of the change with one of the following values:
7096
7110
  */
7097
- cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7111
+ cause: ('inserted' | 'inserted-no-change-overwrite' | 'inserted-no-value-change-overwrite' | 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7098
7112
  /**
7099
7113
  * `true` if the cookie was removed, `false` otherwise.
7100
7114
  */
@@ -7107,7 +7121,7 @@ declare namespace Electron {
7107
7121
  /**
7108
7122
  * The cause of the change with one of the following values:
7109
7123
  */
7110
- cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7124
+ cause: ('inserted' | 'inserted-no-change-overwrite' | 'inserted-no-value-change-overwrite' | 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7111
7125
  /**
7112
7126
  * `true` if the cookie was removed, `false` otherwise.
7113
7127
  */
@@ -7120,7 +7134,7 @@ declare namespace Electron {
7120
7134
  /**
7121
7135
  * The cause of the change with one of the following values:
7122
7136
  */
7123
- cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7137
+ cause: ('inserted' | 'inserted-no-change-overwrite' | 'inserted-no-value-change-overwrite' | 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7124
7138
  /**
7125
7139
  * `true` if the cookie was removed, `false` otherwise.
7126
7140
  */
@@ -7133,7 +7147,7 @@ declare namespace Electron {
7133
7147
  /**
7134
7148
  * The cause of the change with one of the following values:
7135
7149
  */
7136
- cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7150
+ cause: ('inserted' | 'inserted-no-change-overwrite' | 'inserted-no-value-change-overwrite' | 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7137
7151
  /**
7138
7152
  * `true` if the cookie was removed, `false` otherwise.
7139
7153
  */
@@ -7146,7 +7160,7 @@ declare namespace Electron {
7146
7160
  /**
7147
7161
  * The cause of the change with one of the following values:
7148
7162
  */
7149
- cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7163
+ cause: ('inserted' | 'inserted-no-change-overwrite' | 'inserted-no-value-change-overwrite' | 'explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
7150
7164
  /**
7151
7165
  * `true` if the cookie was removed, `false` otherwise.
7152
7166
  */
@@ -7452,9 +7466,12 @@ declare namespace Electron {
7452
7466
  * `DesktopCapturerSource` represents a screen or an individual window that can be
7453
7467
  * captured.
7454
7468
  *
7455
- * > [!NOTE] Capturing the screen contents requires user consent on macOS 10.15
7456
- * Catalina or higher, which can detected by
7457
- * `systemPreferences.getMediaAccessStatus`.
7469
+ * > [!NOTE]
7470
+ *
7471
+ * > * Capturing audio requires `NSAudioCaptureUsageDescription` Info.plist key on
7472
+ * macOS 14.2 Sonoma and higher - read more.
7473
+ * * Capturing the screen contents requires user consent on macOS 10.15 Catalina or
7474
+ * higher, which can detected by `systemPreferences.getMediaAccessStatus`.
7458
7475
  */
7459
7476
  getSources(options: SourcesOptions): Promise<Electron.DesktopCapturerSource[]>;
7460
7477
  }
@@ -7543,8 +7560,8 @@ declare namespace Electron {
7543
7560
  *
7544
7561
  * This API can be called safely before the `ready` event the `app` module emits,
7545
7562
  * it is usually used to report errors in early stage of startup. If called before
7546
- * the app `ready`event on Linux, the message will be emitted to stderr, and no GUI
7547
- * dialog will appear.
7563
+ * the app `ready` event on Linux, the message will be emitted to stderr, and no
7564
+ * GUI dialog will appear.
7548
7565
  */
7549
7566
  showErrorBox(title: string, content: string): void;
7550
7567
  /**
@@ -7799,9 +7816,9 @@ declare namespace Electron {
7799
7816
  */
7800
7817
  displayFrequency: number;
7801
7818
  /**
7802
- * Unique identifier associated with the display. A value of of -1 means the
7803
- * display is invalid or the correct `id` is not yet known, and a value of -10
7804
- * means the display is a virtual display assigned to a unified desktop.
7819
+ * Unique identifier associated with the display. A value of -1 means the display
7820
+ * is invalid or the correct `id` is not yet known, and a value of -10 means the
7821
+ * display is a virtual display assigned to a unified desktop.
7805
7822
  */
7806
7823
  id: number;
7807
7824
  /**
@@ -8604,9 +8621,9 @@ declare namespace Electron {
8604
8621
  removeListener(event: 'end', listener: () => void): this;
8605
8622
  /**
8606
8623
  * Emitted when an error was encountered while streaming response data events. For
8607
- * instance, if the server closes the underlying while the response is still
8608
- * streaming, an `error` event will be emitted on the response object and a `close`
8609
- * event will subsequently follow on the request object.
8624
+ * instance, if the server closes the underlying connection while the response is
8625
+ * still streaming, an `error` event will be emitted on the response object and a
8626
+ * `close` event will subsequently follow on the request object.
8610
8627
  */
8611
8628
  on(event: 'error', listener: (
8612
8629
  /**
@@ -9303,7 +9320,7 @@ declare namespace Electron {
9303
9320
  * opens the associated menu. The indicated character in the button label then gets
9304
9321
  * an underline, and the `&` character is not displayed on the button label.
9305
9322
  *
9306
- * In order to escape the `&` character in an item name, add a proceeding `&`. For
9323
+ * In order to escape the `&` character in an item name, add a preceding `&`. For
9307
9324
  * example, `&&File` would result in `&File` displayed on the button label.
9308
9325
  *
9309
9326
  * Passing `null` will suppress the default menu. On Windows and Linux, this has
@@ -9354,9 +9371,9 @@ declare namespace Electron {
9354
9371
  */
9355
9372
  constructor(options: MenuItemConstructorOptions);
9356
9373
  /**
9357
- * An `Accelerator` (optional) indicating the item's accelerator, if set.
9374
+ * An `Accelerator | null` indicating the item's accelerator, if set.
9358
9375
  */
9359
- accelerator?: Accelerator;
9376
+ accelerator: (Accelerator) | (null);
9360
9377
  /**
9361
9378
  * A `boolean` indicating whether the item is checked. This property can be
9362
9379
  * dynamically changed.
@@ -9766,8 +9783,8 @@ declare namespace Electron {
9766
9783
  */
9767
9784
  readonly inForcedColorsMode: boolean;
9768
9785
  /**
9769
- * A `boolean` that indicates the whether the user has chosen via system
9770
- * accessibility settings to reduce transparency at the OS level.
9786
+ * A `boolean` that indicates whether the user has chosen via system accessibility
9787
+ * settings to reduce transparency at the OS level.
9771
9788
  *
9772
9789
  */
9773
9790
  readonly prefersReducedTransparency: boolean;
@@ -12896,8 +12913,8 @@ declare namespace Electron {
12896
12913
  /**
12897
12914
  * Overrides the `userAgent` and `acceptLanguages` for this session.
12898
12915
  *
12899
- * The `acceptLanguages` must a comma separated ordered list of language codes, for
12900
- * example `"en-US,fr,de,ko,zh-CN,ja"`.
12916
+ * The `acceptLanguages` must be a comma separated ordered list of language codes,
12917
+ * for example `"en-US,fr,de,ko,zh-CN,ja"`.
12901
12918
  *
12902
12919
  * This doesn't affect existing `WebContents`, and each `WebContents` can use
12903
12920
  * `webContents.setUserAgent` to override the session-wide user agent.
@@ -16248,7 +16265,7 @@ declare namespace Electron {
16248
16265
  * 302 redirect.
16249
16266
  *
16250
16267
  * This event cannot be prevented, if you want to prevent redirects you should
16251
- * checkout out the `will-redirect` event above.
16268
+ * check out the `will-redirect` event above.
16252
16269
  */
16253
16270
  on(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
16254
16271
  /**
@@ -17848,7 +17865,8 @@ declare namespace Electron {
17848
17865
  setDevToolsWebContents(devToolsWebContents: WebContents): void;
17849
17866
  /**
17850
17867
  * If _offscreen rendering_ is enabled sets the frame rate to the specified number.
17851
- * Only values between 1 and 240 are accepted.
17868
+ * When `webPreferences.offscreen.useSharedTexture` is `false` only values between
17869
+ * 1 and 240 are accepted.
17852
17870
  */
17853
17871
  setFrameRate(fps: number): void;
17854
17872
  /**
@@ -17889,10 +17907,10 @@ declare namespace Electron {
17889
17907
  */
17890
17908
  setWebRTCUDPPortRange(udpPortRange: UdpPortRange): void;
17891
17909
  /**
17892
- * Called before creating a window a new window is requested by the renderer, e.g.
17893
- * by `window.open()`, a link with `target="_blank"`, shift+clicking on a link, or
17894
- * submitting a form with `<form target="_blank">`. See `window.open()` for more
17895
- * details and how to use this in conjunction with `did-create-window`.
17910
+ * Called before creating a window when a new window is requested by the renderer,
17911
+ * e.g. by `window.open()`, a link with `target="_blank"`, shift+clicking on a
17912
+ * link, or submitting a form with `<form target="_blank">`. See `window.open()`
17913
+ * for more details and how to use this in conjunction with `did-create-window`.
17896
17914
  *
17897
17915
  * An example showing how to customize the process of new `BrowserWindow` creation
17898
17916
  * to be `BrowserView` attached to main window instead:
@@ -17978,7 +17996,7 @@ declare namespace Electron {
17978
17996
  */
17979
17997
  readonly debugger: Debugger;
17980
17998
  /**
17981
- * A `WebContents | null` property that represents the of DevTools `WebContents`
17999
+ * A `WebContents | null` property that represents the DevTools `WebContents`
17982
18000
  * associated with a given `WebContents`.
17983
18001
  *
17984
18002
  * > [!NOTE] Users should never store this object because it may become `null` when
@@ -18628,6 +18646,10 @@ declare namespace Electron {
18628
18646
  * Enables Chromium's experimental features. Default is `false`.
18629
18647
  */
18630
18648
  experimentalFeatures?: boolean;
18649
+ /**
18650
+ * Whether to focus the WebContents when navigating. Default is `true`.
18651
+ */
18652
+ focusOnNavigation?: boolean;
18631
18653
  /**
18632
18654
  * Specifies how to run image animations (E.g. GIFs). Can be `animate`,
18633
18655
  * `animateOnce` or `noAnimation`. Default is `animate`.
@@ -18750,7 +18772,7 @@ declare namespace Electron {
18750
18772
  /**
18751
18773
  * When `false`, it will disable the same-origin policy (usually using testing
18752
18774
  * websites by people), and set `allowRunningInsecureContent` to `true` if this
18753
- * options has not been set by user. Default is `true`.
18775
+ * option has not been set by user. Default is `true`.
18754
18776
  */
18755
18777
  webSecurity?: boolean;
18756
18778
  /**
@@ -26064,14 +26086,14 @@ declare namespace NodeJS {
26064
26086
  /**
26065
26087
  * A `boolean` that controls whether or not deprecations printed to `stderr`
26066
26088
  * include their stack trace. Setting this to `true` will print stack traces for
26067
- * deprecations. This property is instead of the `--trace-deprecation` command line
26068
- * flag.
26089
+ * deprecations. This property is used instead of the `--trace-deprecation` command
26090
+ * line flag.
26069
26091
  */
26070
26092
  traceDeprecation: boolean;
26071
26093
  /**
26072
26094
  * A `boolean` that controls whether or not process warnings printed to `stderr`
26073
26095
  * include their stack trace. Setting this to `true` will print stack traces for
26074
- * process warnings (including deprecations). This property is instead of the
26096
+ * process warnings (including deprecations). This property is used instead of the
26075
26097
  * `--trace-warnings` command line flag.
26076
26098
  */
26077
26099
  traceProcessWarnings: boolean;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "41.0.0-alpha.5",
3
- "extractedAt": "2026-02-02T18:20:30.767Z"
2
+ "electronVersion": "41.0.0-beta.1",
3
+ "extractedAt": "2026-02-12T06:34:37.033Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "41.0.0-alpha.5",
3
+ "version": "41.0.0-beta.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",