electron-types 44.4.4 → 44.5.0

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
@@ -14,11 +14,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
14
14
  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)):
15
15
 
16
16
  ```bash
17
- npm install -D electron-types@44.4.4
17
+ npm install -D electron-types@44.5.0
18
18
  # or
19
- yarn add -D electron-types@44.4.4
19
+ yarn add -D electron-types@44.5.0
20
20
  # or
21
- pnpm add -D electron-types@44.4.4
21
+ pnpm add -D electron-types@44.5.0
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 44.4.4
1
+ // Type definitions for Electron 44.5.0
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
@@ -300,7 +300,8 @@ declare namespace Electron {
300
300
  isMainFrame: boolean) => void): this;
301
301
  /**
302
302
  * Emitted when the child process unexpectedly disappears. This is normally because
303
- * it was crashed or killed. It does not include renderer processes.
303
+ * it was crashed or killed, or because it failed to launch. It does not include
304
+ * renderer processes.
304
305
  */
305
306
  on(event: 'child-process-gone', listener: (event: Event,
306
307
  details: Details) => void): this;
@@ -3308,6 +3309,16 @@ declare namespace Electron {
3308
3309
  * it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10
3309
3310
  * version 2004 and up the window will be removed from capture entirely, older
3310
3311
  * Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
3312
+ * The change takes effect with the next desktop composition, not when the call
3313
+ * returns, so a capture started immediately afterwards can still contain the
3314
+ * window.
3315
+ *
3316
+ * Protection also applies in a Windows remote session. A Remote Desktop client
3317
+ * still shows the window to the remote user, but remote access software that works
3318
+ * by capturing the desktop cannot. To leave windows unprotected in remote sessions
3319
+ * instead, disable the `AllowWindowCaptureExclusionInRemoteSessions` Chromium
3320
+ * feature at the start of your main script. `win.isContentProtected()` still
3321
+ * returns `true` in that case.
3311
3322
  *
3312
3323
  * @platform darwin,win32
3313
3324
  */
@@ -3373,7 +3384,10 @@ declare namespace Electron {
3373
3384
  * Makes the window ignore all mouse events.
3374
3385
  *
3375
3386
  * All mouse events happened in this window will be passed to the window below this
3376
- * window, but if this window has focus, it will still receive keyboard events.
3387
+ * window, but if this window has focus, it will still receive keyboard events. On
3388
+ * Linux this is supported on both X11 and Wayland. On X11 the X server has applied
3389
+ * the window's new input shape when the call returns; on Wayland the new input
3390
+ * region is applied with the window's next frame.
3377
3391
  */
3378
3392
  setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
3379
3393
  /**
@@ -6126,7 +6140,16 @@ declare namespace Electron {
6126
6140
  * On Windows, it calls `SetWindowDisplayAffinity` with `WDA_EXCLUDEFROMCAPTURE`.
6127
6141
  * For Windows 10 version 2004 and up the window will be removed from capture
6128
6142
  * entirely, older Windows versions behave as if `WDA_MONITOR` is applied capturing
6129
- * a black window.
6143
+ * a black window. The change takes effect with the next desktop composition, not
6144
+ * when the call returns, so a capture started immediately afterwards can still
6145
+ * contain the window.
6146
+ *
6147
+ * Protection also applies in a Windows remote session. A Remote Desktop client
6148
+ * still shows the window to the remote user, but remote access software that works
6149
+ * by capturing the desktop cannot. To leave windows unprotected in remote sessions
6150
+ * instead, disable the `AllowWindowCaptureExclusionInRemoteSessions` Chromium
6151
+ * feature at the start of your main script. `win.isContentProtected()` still
6152
+ * returns `true` in that case.
6130
6153
  *
6131
6154
  * On macOS, it sets the `NSWindow`'s `sharingType` to `NSWindowSharingNone`.
6132
6155
  * Unfortunately, due to an intentional change in macOS, newer Mac applications
@@ -6196,7 +6219,10 @@ declare namespace Electron {
6196
6219
  * Makes the window ignore all mouse events.
6197
6220
  *
6198
6221
  * All mouse events happened in this window will be passed to the window below this
6199
- * window, but if this window has focus, it will still receive keyboard events.
6222
+ * window, but if this window has focus, it will still receive keyboard events. On
6223
+ * Linux this is supported on both X11 and Wayland. On X11 the X server has applied
6224
+ * the window's new input shape when the call returns; on Wayland the new input
6225
+ * region is applied with the window's next frame.
6200
6226
  */
6201
6227
  setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
6202
6228
  /**
@@ -7057,7 +7083,7 @@ declare namespace Electron {
7057
7083
  * resolves to a ClipboardBookmark object instead. Rejects when `type` is not
7058
7084
  * present in `clipboardItem.types`.
7059
7085
  */
7060
- getType(type: string): (Promise<Blob>) | (Promise<Electron.ClipboardBookmark>);
7086
+ getType<T extends string>(type: T): Promise<string extends T ? (Blob | ClipboardBookmark) : T extends 'electron application/bookmark' ? ClipboardBookmark : Blob>;
7061
7087
  /**
7062
7088
  * Resolves with a ClipboardBookmark when a bookmark is available in the clipboard.
7063
7089
  * Rejects when a bookmark is not available in the clipboard.
@@ -7436,7 +7462,9 @@ declare namespace Electron {
7436
7462
  /**
7437
7463
  * Set an extra parameter to be sent with the crash report. The values specified
7438
7464
  * here will be sent in addition to any values set via the `extra` option when
7439
- * `start` was called.
7465
+ * `start` was called. Calling this again with the same key replaces the value. The
7466
+ * value is read when a crash happens, so you can update it as your app's state
7467
+ * changes.
7440
7468
  *
7441
7469
  * Parameters added in this fashion (or via the `extra` parameter to
7442
7470
  * `crashReporter.start`) are specific to the calling process. Adding extra
@@ -7444,29 +7472,42 @@ declare namespace Electron {
7444
7472
  * with crashes from renderer or other child processes. Similarly, adding extra
7445
7473
  * parameters in a renderer process will not result in those parameters being sent
7446
7474
  * with crashes that occur in other renderer processes or in the main process.
7475
+ * Processes created with `utilityProcess` have no API for setting extra
7476
+ * parameters, so only `globalExtra` values are sent with their crashes.
7447
7477
  *
7448
7478
  * > [!NOTE] Parameters have limits on the length of the keys and values. Key names
7449
7479
  * must be no longer than 39 bytes, and values must be no longer than 20320 bytes.
7450
- * Keys with names longer than the maximum will be silently ignored. Key values
7451
- * longer than the maximum length will be truncated.
7480
+ * Keys with names longer than the maximum are ignored, and a warning is emitted.
7481
+ * Values longer than the maximum length are truncated.
7452
7482
  */
7453
7483
  addExtraParameter(key: string, value: string): void;
7454
7484
  /**
7455
- * The date and ID of the last crash report. Only crash reports that have been
7456
- * uploaded will be returned; even if a crash report is present on disk it will not
7457
- * be returned until it is uploaded. In the case that there are no uploaded
7458
- * reports, `null` is returned.
7485
+ * The date and ID of the crash report with the most recent upload time, from the
7486
+ * list returned by `getUploadedReports()`. If there are no crash reports at all,
7487
+ * `null` is returned.
7488
+ *
7489
+ * If no report has been uploaded yet but some are stored on disk, a report that
7490
+ * has not been uploaded may be returned. Check that its `id` is not empty before
7491
+ * treating it as uploaded.
7459
7492
  *
7460
7493
  * > [!NOTE] This method is only available in the main process.
7461
7494
  */
7462
7495
  getLastCrashReport(): (CrashReport) | (null);
7463
7496
  /**
7464
- * The current 'extra' parameters of the crash reporter.
7497
+ * The current 'extra' parameters of the crash reporter in the calling process, as
7498
+ * set with the `extra` option and `addExtraParameter`. Parameters set with the
7499
+ * `globalExtra` option are not included.
7465
7500
  */
7466
7501
  getParameters(): Record<string, string>;
7467
7502
  /**
7468
- * Returns all uploaded crash reports. Each report contains the date and uploaded
7469
- * ID.
7503
+ * Returns the crash reports stored on disk. Each report contains the date it was
7504
+ * uploaded and the ID that the crash server returned for it.
7505
+ *
7506
+ * Despite the method's name, reports that have not been uploaded (for example
7507
+ * because `uploadToServer` is `false`, the upload failed, or the report was rate
7508
+ * limited) are included too. For those reports, `id` is an empty string and `date`
7509
+ * is not meaningful. To list only uploaded reports, filter out reports with an
7510
+ * empty `id`.
7470
7511
  *
7471
7512
  * > [!NOTE] This method is only available in the main process.
7472
7513
  */
@@ -7509,9 +7550,9 @@ declare namespace Electron {
7509
7550
  *
7510
7551
  * > [!NOTE] Parameters passed in `extra`, `globalExtra` or set with
7511
7552
  * `addExtraParameter` have limits on the length of the keys and values. Key names
7512
- * must be at most 39 bytes long, and values must be no longer than 127 bytes. Keys
7513
- * with names longer than the maximum will be silently ignored. Key values longer
7514
- * than the maximum length will be truncated.
7553
+ * must be at most 39 bytes long, and values must be no longer than 20320 bytes.
7554
+ * Keys with names longer than the maximum are ignored, and a warning is emitted.
7555
+ * Values longer than the maximum length are truncated.
7515
7556
  *
7516
7557
  * > [!NOTE] This method is only available in the main process.
7517
7558
  */
@@ -18687,7 +18728,8 @@ declare namespace Electron {
18687
18728
  */
18688
18729
  setUserAgent(userAgent: string): void;
18689
18730
  /**
18690
- * Sets the maximum and minimum pinch-to-zoom level.
18731
+ * Sets the maximum and minimum pinch-to-zoom level. The page keeps its normal
18732
+ * scale until the user pinches; a `minimumLevel` below 1 only allows zooming out.
18691
18733
  *
18692
18734
  * > [!NOTE] Visual zoom is disabled by default in Electron. To re-enable it, call:
18693
18735
  */
@@ -18719,14 +18761,15 @@ declare namespace Electron {
18719
18761
  * Changes the zoom factor to the specified factor. Zoom factor is zoom percent
18720
18762
  * divided by 100, so 300% = 3.0.
18721
18763
  *
18722
- * The factor must be greater than 0.0.
18764
+ * The factor must be greater than 0.0. Values outside the range Chromium can
18765
+ * display (0.25 to 5.0) are clamped to it.
18723
18766
  */
18724
18767
  setZoomFactor(factor: number): void;
18725
18768
  /**
18726
18769
  * Changes the zoom level to the specified level. The original size is 0 and each
18727
- * increment above or below represents zooming 20% larger or smaller to default
18728
- * limits of 300% and 50% of original size, respectively. The formula for this is
18729
- * `scale := 1.2 ^ level`.
18770
+ * increment above or below represents zooming 20% larger or smaller. The formula
18771
+ * for this is `scale := 1.2 ^ level`, and the level is clamped to the range
18772
+ * Chromium can display (25% to 500%, about -7.6 to 8.8).
18730
18773
  *
18731
18774
  * > [!NOTE] The zoom policy at the Chromium level is same-origin by default,
18732
18775
  * meaning that the zoom level for a specific domain propagates across all
@@ -21515,18 +21558,20 @@ declare namespace Electron {
21515
21558
  uploadToServer?: boolean;
21516
21559
  /**
21517
21560
  * If true, crashes generated in the main process will not be forwarded to the
21518
- * system crash handler. Default is `false`.
21561
+ * system crash handler. This option has no effect on Windows. Default is `false`.
21562
+ *
21563
+ * @platform darwin,linux
21519
21564
  */
21520
21565
  ignoreSystemCrashHandler?: boolean;
21521
21566
  /**
21522
- * If true, limit the number of crashes uploaded to 1/hour. Default is `false`.
21523
- *
21524
- * @platform darwin,win32
21567
+ * If true, limit the number of crashes uploaded to 1/hour. Crash reports over the
21568
+ * limit are not uploaded, but are still stored on disk. Default is `false`.
21525
21569
  */
21526
21570
  rateLimit?: boolean;
21527
21571
  /**
21528
21572
  * If true, crash reports will be compressed and uploaded with `Content-Encoding:
21529
- * gzip`. Default is `true`.
21573
+ * gzip`. Setting this to `false` while `uploadToServer` is `true` is deprecated
21574
+ * and logs a deprecation warning. Default is `true`.
21530
21575
  */
21531
21576
  compress?: boolean;
21532
21577
  /**
@@ -21543,7 +21588,8 @@ declare namespace Electron {
21543
21588
  * crash reporter has been started. If a key is present in both the global extra
21544
21589
  * parameters and the process-specific extra parameters, then the global one will
21545
21590
  * take precedence. By default, `productName` and the app version are included, as
21546
- * well as the Electron version.
21591
+ * well as the Electron version. Global extra parameters are not returned by
21592
+ * `getParameters()`.
21547
21593
  */
21548
21594
  globalExtra?: Record<string, string>;
21549
21595
  }
@@ -21676,9 +21722,17 @@ declare namespace Electron {
21676
21722
  reason: ('clean-exit' | 'abnormal-exit' | 'killed' | 'crashed' | 'oom' | 'launch-failed' | 'integrity-failure' | 'memory-eviction');
21677
21723
  /**
21678
21724
  * The exit code for the process (e.g. status from waitpid if on POSIX, from
21679
- * GetExitCodeProcess on Windows).
21725
+ * GetExitCodeProcess on Windows), unless `reason` is `launch-failed`, in which
21726
+ * case `exitCode` will be a platform-specific launch failure error code.
21680
21727
  */
21681
21728
  exitCode: number;
21729
+ /**
21730
+ * The Windows system error code (`GetLastError()`) of the failed launch. Only set
21731
+ * when `reason` is `launch-failed`.
21732
+ *
21733
+ * @platform win32
21734
+ */
21735
+ systemErrorCode?: number;
21682
21736
  /**
21683
21737
  * The non-localized name of the process.
21684
21738
  */
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "44.4.4",
3
- "extractedAt": "2026-09-22T19:11:39.810Z"
2
+ "electronVersion": "44.5.0",
3
+ "extractedAt": "2026-09-29T20:14:55.675Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "44.4.4",
3
+ "version": "44.5.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",