electron-types 41.3.0 → 41.4.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
@@ -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.3.0
14
+ npm install -D electron-types@41.4.0
15
15
  # or
16
- yarn add -D electron-types@41.3.0
16
+ yarn add -D electron-types@41.4.0
17
17
  # or
18
- pnpm add -D electron-types@41.3.0
18
+ pnpm add -D electron-types@41.4.0
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 41.3.0
1
+ // Type definitions for Electron 41.4.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
@@ -7013,6 +7013,34 @@ declare namespace Electron {
7013
7013
 
7014
7014
  // Docs: https://electronjs.org/docs/api/content-tracing
7015
7015
 
7016
+ /**
7017
+ * Resolves once heap profiling has been enabled.
7018
+ *
7019
+ * Enable heap profiling for MemoryInfra traces. Equivalent to the `--memlog`
7020
+ * switch in Chrome.
7021
+ *
7022
+ * Only takes effect if the `disabled-by-default-memory-infra` category is
7023
+ * included.
7024
+ *
7025
+ * Needs to be called before `contentTracing.startRecording()`.
7026
+ *
7027
+ * Usage:
7028
+ *
7029
+ * To view the recorded heap dumps:
7030
+ *
7031
+ * * Download the breakpad symbols for your Electron version from the Electron
7032
+ * GitHub releases
7033
+ * * Clone the Electron source code
7034
+ * * In your Chromium checkout for Electron, run this command to symbolicate the
7035
+ * heap dump:
7036
+ * * Open the symbolicated trace in `chrome://tracing` (the Perfetto UI does not
7037
+ * support memory dumps yet)
7038
+ * * Click on one of the `M` symbols
7039
+ * * Click on a `☰` triple bar icon (e.g., in the `malloc` column)
7040
+ *
7041
+ * @experimental
7042
+ */
7043
+ enableHeapProfiling(options?: EnableHeapProfilingOptions): Promise<void>;
7016
7044
  /**
7017
7045
  * resolves with an array of category groups once all child processes have
7018
7046
  * acknowledged the `getCategories` request
@@ -8193,6 +8221,32 @@ declare namespace Electron {
8193
8221
  savePath: string;
8194
8222
  }
8195
8223
 
8224
+ interface EnableHeapProfilingOptions {
8225
+
8226
+ // Docs: https://electronjs.org/docs/api/structures/enable-heap-profiling-options
8227
+
8228
+ /**
8229
+ * Controls which processes are profiled. Equivalent to `--memlog` in Chrome.
8230
+ * Default is `all`.
8231
+ */
8232
+ mode?: ('all' | 'browser' | 'gpu' | 'minimal' | 'renderer-sampling' | 'all-renderers' | 'utility-sampling' | 'all-utilities' | 'utility-and-browser');
8233
+ /**
8234
+ * Controls the sampling interval in bytes. The lower the interval, the more
8235
+ * precise the profile is. However it comes at the cost of performance. Default is
8236
+ * `100000` (100KB). That is enough to observe allocation sites that make
8237
+ * allocations >500KB total, where total equals to a single allocation size times
8238
+ * the number of such allocations at the same call site. Equivalent to
8239
+ * `--memlog-sampling-rate` in Chrome. Must be an integer between `1000` and
8240
+ * `10000000`.
8241
+ */
8242
+ samplingRate?: number;
8243
+ /**
8244
+ * Controls the type of metadata recorded for each allocation. Equivalent to
8245
+ * `--memlog-stack-mode` in Chrome. Default is `native`.
8246
+ */
8247
+ stackMode?: ('native' | 'native-with-thread-names');
8248
+ }
8249
+
8196
8250
  interface Extension {
8197
8251
 
8198
8252
  // Docs: https://electronjs.org/docs/api/structures/extension
@@ -20765,6 +20819,8 @@ declare namespace Electron {
20765
20819
  postBody?: PostBody;
20766
20820
  /**
20767
20821
  * Can be `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
20822
+ * Corresponds to the manner an associated link was clicked. See Chromium's
20823
+ * WindowOpenDisposition.
20768
20824
  */
20769
20825
  disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other');
20770
20826
  }
@@ -21096,6 +21152,8 @@ declare namespace Electron {
21096
21152
  features: string;
21097
21153
  /**
21098
21154
  * Can be `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
21155
+ * Corresponds to the manner an associated link was clicked. See Chromium's
21156
+ * WindowOpenDisposition.
21099
21157
  */
21100
21158
  disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other');
21101
21159
  /**
@@ -21895,6 +21953,13 @@ declare namespace Electron {
21895
21953
  * @experimental
21896
21954
  */
21897
21955
  sharedTexturePixelFormat?: ('argb' | 'rgbaf16');
21956
+ /**
21957
+ * The device scale factor of the offscreen rendering output. If not set, will use
21958
+ * primary display's scale factor as default.
21959
+ *
21960
+ * @experimental
21961
+ */
21962
+ deviceScaleFactor?: number;
21898
21963
  }
21899
21964
 
21900
21965
  interface OnBeforeRedirectListenerDetails {
@@ -24434,6 +24499,7 @@ declare namespace Electron {
24434
24499
  type CustomScheme = Electron.CustomScheme;
24435
24500
  type DesktopCapturerSource = Electron.DesktopCapturerSource;
24436
24501
  type Display = Electron.Display;
24502
+ type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
24437
24503
  type Extension = Electron.Extension;
24438
24504
  type ExtensionInfo = Electron.ExtensionInfo;
24439
24505
  type FileFilter = Electron.FileFilter;
@@ -24831,6 +24897,7 @@ declare namespace Electron {
24831
24897
  type CustomScheme = Electron.CustomScheme;
24832
24898
  type DesktopCapturerSource = Electron.DesktopCapturerSource;
24833
24899
  type Display = Electron.Display;
24900
+ type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
24834
24901
  type Extension = Electron.Extension;
24835
24902
  type ExtensionInfo = Electron.ExtensionInfo;
24836
24903
  type FileFilter = Electron.FileFilter;
@@ -25156,6 +25223,7 @@ declare namespace Electron {
25156
25223
  type CustomScheme = Electron.CustomScheme;
25157
25224
  type DesktopCapturerSource = Electron.DesktopCapturerSource;
25158
25225
  type Display = Electron.Display;
25226
+ type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
25159
25227
  type Extension = Electron.Extension;
25160
25228
  type ExtensionInfo = Electron.ExtensionInfo;
25161
25229
  type FileFilter = Electron.FileFilter;
@@ -25480,6 +25548,7 @@ declare namespace Electron {
25480
25548
  type CustomScheme = Electron.CustomScheme;
25481
25549
  type DesktopCapturerSource = Electron.DesktopCapturerSource;
25482
25550
  type Display = Electron.Display;
25551
+ type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
25483
25552
  type Extension = Electron.Extension;
25484
25553
  type ExtensionInfo = Electron.ExtensionInfo;
25485
25554
  type FileFilter = Electron.FileFilter;
@@ -25898,6 +25967,7 @@ declare namespace Electron {
25898
25967
  type CustomScheme = Electron.CustomScheme;
25899
25968
  type DesktopCapturerSource = Electron.DesktopCapturerSource;
25900
25969
  type Display = Electron.Display;
25970
+ type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
25901
25971
  type Extension = Electron.Extension;
25902
25972
  type ExtensionInfo = Electron.ExtensionInfo;
25903
25973
  type FileFilter = Electron.FileFilter;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "41.3.0",
3
- "extractedAt": "2026-04-23T00:59:39.759Z"
2
+ "electronVersion": "41.4.0",
3
+ "extractedAt": "2026-05-01T01:09:34.954Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "41.3.0",
3
+ "version": "41.4.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",