electron-types 36.9.5 → 37.6.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.
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 36.9.5
1
+ // Type definitions for Electron 37.6.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
@@ -1219,7 +1219,7 @@ declare namespace Electron {
1219
1219
  * called first, a default log directory will be created equivalent to calling
1220
1220
  * `app.setAppLogsPath()` without a `path` parameter.
1221
1221
  */
1222
- getPath(name: 'home' | 'appData' | 'userData' | 'sessionData' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string;
1222
+ getPath(name: 'home' | 'appData' | 'assets' | 'userData' | 'sessionData' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string;
1223
1223
  /**
1224
1224
  * The user's preferred system languages from most preferred to least preferred,
1225
1225
  * including the country codes if applicable. A user can modify and add to this
@@ -5825,10 +5825,11 @@ declare namespace Electron {
5825
5825
  /**
5826
5826
  * Prevents the window contents from being captured by other apps.
5827
5827
  *
5828
- * On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On Windows
5829
- * it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10
5830
- * version 2004 and up the window will be removed from capture entirely, older
5831
- * Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
5828
+ * On macOS it sets the NSWindow's `sharingType` to `NSWindowSharingNone`. On
5829
+ * Windows it calls `SetWindowDisplayAffinity` with `WDA_EXCLUDEFROMCAPTURE`. For
5830
+ * Windows 10 version 2004 and up the window will be removed from capture entirely,
5831
+ * older Windows versions behave as if `WDA_MONITOR` is applied capturing a black
5832
+ * window.
5832
5833
  *
5833
5834
  * @platform darwin,win32
5834
5835
  */
@@ -9320,9 +9321,11 @@ declare namespace Electron {
9320
9321
  toolTip: string;
9321
9322
  /**
9322
9323
  * A `string` indicating the type of the item. Can be `normal`, `separator`,
9323
- * `submenu`, `checkbox` or `radio`.
9324
+ * `submenu`, `checkbox`, `radio`, `header` or `palette`.
9325
+ *
9326
+ * > [!NOTE] `header` and `palette` are only available on macOS 14 and up.
9324
9327
  */
9325
- type: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
9328
+ type: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio' | 'header' | 'palette');
9326
9329
  /**
9327
9330
  * An `Accelerator | null` indicating the item's user-assigned accelerator for the
9328
9331
  * menu item.
@@ -11114,9 +11117,8 @@ declare namespace Electron {
11114
11117
  */
11115
11118
  referrer?: string;
11116
11119
  /**
11117
- * The session used for requesting URL, by default the HTTP request will reuse the
11118
- * current session. Setting `session` to `null` would use a random independent
11119
- * session. This is only used for URL responses.
11120
+ * The session used for requesting URL. The HTTP request will reuse the current
11121
+ * session by default.
11120
11122
  */
11121
11123
  session?: Session;
11122
11124
  /**
@@ -11609,6 +11611,12 @@ declare namespace Electron {
11609
11611
  * @experimental
11610
11612
  */
11611
11613
  readonly scope: string;
11614
+ /**
11615
+ * A `string` representing the script URL of the service worker.
11616
+ *
11617
+ * @experimental
11618
+ */
11619
+ readonly scriptURL: string;
11612
11620
  /**
11613
11621
  * A `number` representing the ID of the specific version of the service worker
11614
11622
  * script in its scope.
@@ -12657,8 +12665,11 @@ declare namespace Electron {
12657
12665
  * get complete permission handling. Most web APIs do a permission check and then
12658
12666
  * make a permission request if the check is denied. To clear the handler, call
12659
12667
  * `setPermissionCheckHandler(null)`.
12668
+ *
12669
+ * > [!NOTE] `isMainFrame` will always be `false` for a `fileSystem` request as a
12670
+ * result of Chromium limitations.
12660
12671
  */
12661
- setPermissionCheckHandler(handler: ((webContents: (WebContents) | (null), permission: 'clipboard-read' | 'clipboard-sanitized-write' | 'geolocation' | 'fullscreen' | 'hid' | 'idle-detection' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'notifications' | 'openExternal' | 'pointerLock' | 'serial' | 'storage-access' | 'top-level-storage-access' | 'usb' | 'deprecated-sync-clipboard-read', requestingOrigin: string, details: PermissionCheckHandlerHandlerDetails) => boolean) | (null)): void;
12672
+ setPermissionCheckHandler(handler: ((webContents: (WebContents) | (null), permission: 'clipboard-read' | 'clipboard-sanitized-write' | 'geolocation' | 'fullscreen' | 'hid' | 'idle-detection' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'notifications' | 'openExternal' | 'pointerLock' | 'serial' | 'storage-access' | 'top-level-storage-access' | 'usb' | 'deprecated-sync-clipboard-read' | 'fileSystem', requestingOrigin: string, details: PermissionCheckHandlerHandlerDetails) => boolean) | (null)): void;
12662
12673
  /**
12663
12674
  * Sets the handler which can be used to respond to permission requests for the
12664
12675
  * `session`. Calling `callback(true)` will allow the permission and
@@ -18208,12 +18219,6 @@ declare namespace Electron {
18208
18219
  * RuntimeEnabledFeatures.json5 file.
18209
18220
  */
18210
18221
  enableBlinkFeatures?: string;
18211
- /**
18212
- * Whether the `-electron-corner-smoothing` CSS rule is enabled. Default is `true`.
18213
- *
18214
- * @experimental
18215
- */
18216
- enableCornerSmoothingCSS?: boolean;
18217
18222
  /**
18218
18223
  * Whether to enable the `paste` execCommand. Default is `false`.
18219
18224
  *
@@ -20020,9 +20025,9 @@ declare namespace Electron {
20020
20025
  /**
20021
20026
  * Extra string key/value annotations that will be sent along with crash reports
20022
20027
  * that are generated in the main process. Only string values are supported.
20023
- * Crashes generated in child processes will not contain these extra parameters to
20024
- * crash reports generated from child processes, call `addExtraParameter` from the
20025
- * child process.
20028
+ * Crashes generated in child processes will not include these extra parameters. To
20029
+ * add extra parameters to crash reports generated from child processes, call
20030
+ * `addExtraParameter` from the child process.
20026
20031
  */
20027
20032
  extra?: Record<string, string>;
20028
20033
  /**
@@ -20891,10 +20896,7 @@ declare namespace Electron {
20891
20896
  * be ignored. See roles.
20892
20897
  */
20893
20898
  role?: ('undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'pasteAndMatchStyle' | 'delete' | 'selectAll' | 'reload' | 'forceReload' | 'toggleDevTools' | 'resetZoom' | 'zoomIn' | 'zoomOut' | 'toggleSpellChecker' | 'togglefullscreen' | 'window' | 'minimize' | 'close' | 'help' | 'about' | 'services' | 'hide' | 'hideOthers' | 'unhide' | 'quit' | 'showSubstitutions' | 'toggleSmartQuotes' | 'toggleSmartDashes' | 'toggleTextReplacement' | 'startSpeaking' | 'stopSpeaking' | 'zoom' | 'front' | 'appMenu' | 'fileMenu' | 'editMenu' | 'viewMenu' | 'shareMenu' | 'recentDocuments' | 'toggleTabBar' | 'selectNextTab' | 'selectPreviousTab' | 'showAllTabs' | 'mergeAllWindows' | 'clearRecentDocuments' | 'moveTabToNewWindow' | 'windowMenu');
20894
- /**
20895
- * Can be `normal`, `separator`, `submenu`, `checkbox` or `radio`.
20896
- */
20897
- type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
20899
+ type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio' | 'header' | 'palette');
20898
20900
  label?: string;
20899
20901
  /**
20900
20902
  * Available in macOS >= 14.4
@@ -21653,7 +21655,7 @@ declare namespace Electron {
21653
21655
  */
21654
21656
  securityOrigin?: string;
21655
21657
  /**
21656
- * The type of media access being requested, can be `video`, `audio` or `unknown`
21658
+ * The type of media access being requested, can be `video`, `audio` or `unknown`.
21657
21659
  */
21658
21660
  mediaType?: ('video' | 'audio' | 'unknown');
21659
21661
  /**
@@ -21662,9 +21664,21 @@ declare namespace Electron {
21662
21664
  */
21663
21665
  requestingUrl?: string;
21664
21666
  /**
21665
- * Whether the frame making the request is the main frame
21667
+ * Whether the frame making the request is the main frame.
21666
21668
  */
21667
21669
  isMainFrame: boolean;
21670
+ /**
21671
+ * The path of a `fileSystem` request.
21672
+ */
21673
+ filePath?: string;
21674
+ /**
21675
+ * Whether a `fileSystem` request is a directory.
21676
+ */
21677
+ isDirectory?: boolean;
21678
+ /**
21679
+ * The access type of a `fileSystem` request. Can be `writable` or `readable`.
21680
+ */
21681
+ fileAccessType?: ('writable' | 'readable');
21668
21682
  }
21669
21683
 
21670
21684
  interface PluginCrashedEvent extends DOMEvent {
@@ -22305,6 +22319,20 @@ declare namespace Electron {
22305
22319
  * The total amount of memory not being used by applications or disk cache.
22306
22320
  */
22307
22321
  free: number;
22322
+ /**
22323
+ * The amount of memory that currently has been paged out to storage. Includes
22324
+ * memory for file caches, network buffers, and other system services.
22325
+ *
22326
+ * @platform darwin
22327
+ */
22328
+ fileBacked: number;
22329
+ /**
22330
+ * The amount of memory that is marked as "purgeable". The system can reclaim it if
22331
+ * memory pressure increases.
22332
+ *
22333
+ * @platform darwin
22334
+ */
22335
+ purgeable: number;
22308
22336
  /**
22309
22337
  * The total amount of swap memory in Kilobytes available to the system.
22310
22338
  *
@@ -25274,6 +25302,11 @@ declare namespace NodeJS {
25274
25302
  * to the system.
25275
25303
  * * `free` Integer - The total amount of memory not being used by applications or
25276
25304
  * disk cache.
25305
+ * * `fileBacked` Integer _macOS_ - The amount of memory that currently has been
25306
+ * paged out to storage. Includes memory for file caches, network buffers, and
25307
+ * other system services.
25308
+ * * `purgeable` Integer _macOS_ - The amount of memory that is marked as
25309
+ * "purgeable". The system can reclaim it if memory pressure increases.
25277
25310
  * * `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in
25278
25311
  * Kilobytes available to the system.
25279
25312
  * * `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "36.9.5",
3
- "extractedAt": "2025-12-24T03:20:44.230Z"
2
+ "electronVersion": "37.6.0",
3
+ "extractedAt": "2025-12-24T03:23:11.179Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "36.9.5",
3
+ "version": "37.6.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",