electron-types 41.4.0 → 41.5.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
@@ -1,5 +1,9 @@
1
1
  # electron-types
2
2
 
3
+ [![CI](https://badgen.net/github/checks/biw/electron-types)](https://github.com/biw/electron-types/actions)
4
+ [![npm version](https://badgen.net/npm/v/electron-types)](https://www.npmjs.com/package/electron-types)
5
+ [![npm downloads](https://badgen.net/npm/dt/electron-types)](https://www.npmjs.com/package/electron-types)
6
+
3
7
  TypeScript type definitions extracted from the [electron](https://www.electronjs.org/) package.
4
8
 
5
9
  ## Why?
@@ -11,11 +15,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
11
15
  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
16
 
13
17
  ```bash
14
- npm install -D electron-types@41.4.0
18
+ npm install -D electron-types@41.5.1
15
19
  # or
16
- yarn add -D electron-types@41.4.0
20
+ yarn add -D electron-types@41.5.1
17
21
  # or
18
- pnpm add -D electron-types@41.4.0
22
+ pnpm add -D electron-types@41.5.1
19
23
  ```
20
24
 
21
25
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 41.4.0
1
+ // Type definitions for Electron 41.5.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
@@ -1015,6 +1015,26 @@ declare namespace Electron {
1015
1015
  * This API must be called after the `ready` event is emitted.
1016
1016
  */
1017
1017
  configureHostResolver(options: ConfigureHostResolverOptions): void;
1018
+ /**
1019
+ * Configures platform authenticators for the Web Authentication API
1020
+ * (`navigator.credentials.create()` / `navigator.credentials.get()`). Until this
1021
+ * is called, `PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()`
1022
+ * resolves to `false` and platform-authenticator requests are not serviced.
1023
+ *
1024
+ * When `touchID` is provided, WebAuthn credentials are stored in the macOS
1025
+ * keychain and bound to this device's Secure Enclave. Electron automatically
1026
+ * generates and persists a per-`session` metadata secret so that credentials
1027
+ * created in one partition are not visible to another.
1028
+ *
1029
+ * With the matching entitlement in your app's `entitlements.plist`:
1030
+ *
1031
+ * > [!NOTE] Touch ID WebAuthn credentials are device-bound and are not synced via
1032
+ * iCloud Keychain. They are only available on Macs with a Secure Enclave (Apple
1033
+ * silicon, or Intel Macs with a T2 chip).
1034
+ *
1035
+ * @platform darwin
1036
+ */
1037
+ configureWebAuthn(options: ConfigureWebAuthnOptions): void;
1018
1038
  /**
1019
1039
  * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain
1020
1040
  * basis if the GPU process crashes too frequently. This function disables that
@@ -12319,6 +12339,37 @@ declare namespace Electron {
12319
12339
  removeListener(event: 'select-usb-device', listener: (event: Event,
12320
12340
  details: SelectUsbDeviceDetails,
12321
12341
  callback: (deviceId?: string) => void) => void): this;
12342
+ /**
12343
+ * Emitted when a call to `navigator.credentials.get()` resolves multiple
12344
+ * discoverable WebAuthn credentials and the user must choose one. `callback`
12345
+ * should be called with the `credentialId` of the selected account; passing no
12346
+ * arguments — or a `credentialId` that does not match one of the provided accounts
12347
+ * — will cancel the request and the page will receive a `NotAllowedError`. If no
12348
+ * listener is registered for this event, the request is cancelled with the same
12349
+ * error. The credential request remains pending until the listener invokes the
12350
+ * callback, so always invoke it exactly once — typically from a `try { … } finally
12351
+ * { callback(…) }` block.
12352
+ *
12353
+ * On macOS, the Touch ID platform authenticator surfaces accounts via this event
12354
+ * once it has been configured with `app.configureWebAuthn`. The event may also
12355
+ * fire on other platforms when a roaming FIDO2 authenticator returns multiple
12356
+ * discoverable credentials.
12357
+ */
12358
+ on(event: 'select-webauthn-account', listener: (event: Event,
12359
+ details: SelectWebauthnAccountDetails,
12360
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12361
+ off(event: 'select-webauthn-account', listener: (event: Event,
12362
+ details: SelectWebauthnAccountDetails,
12363
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12364
+ once(event: 'select-webauthn-account', listener: (event: Event,
12365
+ details: SelectWebauthnAccountDetails,
12366
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12367
+ addListener(event: 'select-webauthn-account', listener: (event: Event,
12368
+ details: SelectWebauthnAccountDetails,
12369
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12370
+ removeListener(event: 'select-webauthn-account', listener: (event: Event,
12371
+ details: SelectWebauthnAccountDetails,
12372
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12322
12373
  /**
12323
12374
  * Emitted after `navigator.serial.requestPort` has been called and
12324
12375
  * `select-serial-port` has fired if a new serial port becomes available before the
@@ -15562,6 +15613,32 @@ declare namespace Electron {
15562
15613
  readonly children: View[];
15563
15614
  }
15564
15615
 
15616
+ interface WebAuthnAccount {
15617
+
15618
+ // Docs: https://electronjs.org/docs/api/structures/webauthn-account
15619
+
15620
+ /**
15621
+ * URL-safe base64-encoded (no padding) credential ID of the discoverable
15622
+ * credential. Matches `PublicKeyCredential.id` returned by
15623
+ * `navigator.credentials.get()` in the renderer.
15624
+ */
15625
+ credentialId: string;
15626
+ /**
15627
+ * Human-palatable name for the account, intended for display.
15628
+ */
15629
+ displayName?: string;
15630
+ /**
15631
+ * Human-palatable identifier for the account (for example, an email address or
15632
+ * username).
15633
+ */
15634
+ name?: string;
15635
+ /**
15636
+ * URL-safe base64-encoded (no padding) user handle (`user.id`) that was provided
15637
+ * when the credential was created.
15638
+ */
15639
+ userHandle?: string;
15640
+ }
15641
+
15565
15642
  class WebContents extends NodeEventEmitter {
15566
15643
 
15567
15644
  // Docs: https://electronjs.org/docs/api/web-contents
@@ -20345,6 +20422,14 @@ declare namespace Electron {
20345
20422
  enableAdditionalDnsQueryTypes?: boolean;
20346
20423
  }
20347
20424
 
20425
+ interface ConfigureWebAuthnOptions {
20426
+ /**
20427
+ * Enables the Touch ID / Secure Enclave platform authenticator for Web
20428
+ * Authentication requests.
20429
+ */
20430
+ touchID?: TouchId;
20431
+ }
20432
+
20348
20433
  interface ConsoleMessageEvent extends DOMEvent {
20349
20434
  /**
20350
20435
  * The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and
@@ -22859,6 +22944,19 @@ declare namespace Electron {
22859
22944
  frame: (WebFrameMain) | (null);
22860
22945
  }
22861
22946
 
22947
+ interface SelectWebauthnAccountDetails {
22948
+ /**
22949
+ * The relying party identifier from the WebAuthn request.
22950
+ */
22951
+ relyingPartyId: string;
22952
+ accounts: WebAuthnAccount[];
22953
+ /**
22954
+ * The frame initiating this event. May be `null` if accessed after the frame has
22955
+ * either navigated or been destroyed.
22956
+ */
22957
+ frame: (WebFrameMain) | (null);
22958
+ }
22959
+
22862
22960
  interface SendSharedTextureOptions {
22863
22961
  /**
22864
22962
  * The target frame to transfer the shared texture to. For `WebContents`, you can
@@ -24189,6 +24287,16 @@ declare namespace Electron {
24189
24287
  fd: number;
24190
24288
  }
24191
24289
 
24290
+ interface TouchId {
24291
+ /**
24292
+ * The keychain access group that WebAuthn credentials will be stored under. This
24293
+ * value **must** also be present in your app's `keychain-access-groups`
24294
+ * code-signing entitlement, and is typically of the form
24295
+ * `<TEAM_ID>.<BUNDLE_ID>.webauthn`.
24296
+ */
24297
+ keychainAccessGroup: string;
24298
+ }
24299
+
24192
24300
  interface Video {
24193
24301
  /**
24194
24302
  * The id of the stream being granted. This will usually come from a
@@ -24296,6 +24404,7 @@ declare namespace Electron {
24296
24404
  type Configuration = Electron.Configuration;
24297
24405
  type Configurations = Electron.Configurations;
24298
24406
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
24407
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
24299
24408
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
24300
24409
  type ContextMenuEvent = Electron.ContextMenuEvent;
24301
24410
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -24418,6 +24527,7 @@ declare namespace Electron {
24418
24527
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
24419
24528
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
24420
24529
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
24530
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
24421
24531
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
24422
24532
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
24423
24533
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -24483,6 +24593,7 @@ declare namespace Electron {
24483
24593
  type PageRanges = Electron.PageRanges;
24484
24594
  type Params = Electron.Params;
24485
24595
  type Planes = Electron.Planes;
24596
+ type TouchId = Electron.TouchId;
24486
24597
  type Video = Electron.Video;
24487
24598
  type Alternate = Electron.Alternate;
24488
24599
  type Alternates = Electron.Alternates;
@@ -24576,6 +24687,7 @@ declare namespace Electron {
24576
24687
  type UploadRawData = Electron.UploadRawData;
24577
24688
  type USBDevice = Electron.USBDevice;
24578
24689
  type UserDefaultTypes = Electron.UserDefaultTypes;
24690
+ type WebAuthnAccount = Electron.WebAuthnAccount;
24579
24691
  type WebPreferences = Electron.WebPreferences;
24580
24692
  type WebRequestFilter = Electron.WebRequestFilter;
24581
24693
  type WebSource = Electron.WebSource;
@@ -24694,6 +24806,7 @@ declare namespace Electron {
24694
24806
  type Configuration = Electron.Configuration;
24695
24807
  type Configurations = Electron.Configurations;
24696
24808
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
24809
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
24697
24810
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
24698
24811
  type ContextMenuEvent = Electron.ContextMenuEvent;
24699
24812
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -24816,6 +24929,7 @@ declare namespace Electron {
24816
24929
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
24817
24930
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
24818
24931
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
24932
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
24819
24933
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
24820
24934
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
24821
24935
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -24881,6 +24995,7 @@ declare namespace Electron {
24881
24995
  type PageRanges = Electron.PageRanges;
24882
24996
  type Params = Electron.Params;
24883
24997
  type Planes = Electron.Planes;
24998
+ type TouchId = Electron.TouchId;
24884
24999
  type Video = Electron.Video;
24885
25000
  type Alternate = Electron.Alternate;
24886
25001
  type Alternates = Electron.Alternates;
@@ -24974,6 +25089,7 @@ declare namespace Electron {
24974
25089
  type UploadRawData = Electron.UploadRawData;
24975
25090
  type USBDevice = Electron.USBDevice;
24976
25091
  type UserDefaultTypes = Electron.UserDefaultTypes;
25092
+ type WebAuthnAccount = Electron.WebAuthnAccount;
24977
25093
  type WebPreferences = Electron.WebPreferences;
24978
25094
  type WebRequestFilter = Electron.WebRequestFilter;
24979
25095
  type WebSource = Electron.WebSource;
@@ -25020,6 +25136,7 @@ declare namespace Electron {
25020
25136
  type Configuration = Electron.Configuration;
25021
25137
  type Configurations = Electron.Configurations;
25022
25138
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
25139
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
25023
25140
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
25024
25141
  type ContextMenuEvent = Electron.ContextMenuEvent;
25025
25142
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -25142,6 +25259,7 @@ declare namespace Electron {
25142
25259
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
25143
25260
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
25144
25261
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
25262
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
25145
25263
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
25146
25264
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
25147
25265
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -25207,6 +25325,7 @@ declare namespace Electron {
25207
25325
  type PageRanges = Electron.PageRanges;
25208
25326
  type Params = Electron.Params;
25209
25327
  type Planes = Electron.Planes;
25328
+ type TouchId = Electron.TouchId;
25210
25329
  type Video = Electron.Video;
25211
25330
  type Alternate = Electron.Alternate;
25212
25331
  type Alternates = Electron.Alternates;
@@ -25300,6 +25419,7 @@ declare namespace Electron {
25300
25419
  type UploadRawData = Electron.UploadRawData;
25301
25420
  type USBDevice = Electron.USBDevice;
25302
25421
  type UserDefaultTypes = Electron.UserDefaultTypes;
25422
+ type WebAuthnAccount = Electron.WebAuthnAccount;
25303
25423
  type WebPreferences = Electron.WebPreferences;
25304
25424
  type WebRequestFilter = Electron.WebRequestFilter;
25305
25425
  type WebSource = Electron.WebSource;
@@ -25345,6 +25465,7 @@ declare namespace Electron {
25345
25465
  type Configuration = Electron.Configuration;
25346
25466
  type Configurations = Electron.Configurations;
25347
25467
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
25468
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
25348
25469
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
25349
25470
  type ContextMenuEvent = Electron.ContextMenuEvent;
25350
25471
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -25467,6 +25588,7 @@ declare namespace Electron {
25467
25588
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
25468
25589
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
25469
25590
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
25591
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
25470
25592
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
25471
25593
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
25472
25594
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -25532,6 +25654,7 @@ declare namespace Electron {
25532
25654
  type PageRanges = Electron.PageRanges;
25533
25655
  type Params = Electron.Params;
25534
25656
  type Planes = Electron.Planes;
25657
+ type TouchId = Electron.TouchId;
25535
25658
  type Video = Electron.Video;
25536
25659
  type Alternate = Electron.Alternate;
25537
25660
  type Alternates = Electron.Alternates;
@@ -25625,6 +25748,7 @@ declare namespace Electron {
25625
25748
  type UploadRawData = Electron.UploadRawData;
25626
25749
  type USBDevice = Electron.USBDevice;
25627
25750
  type UserDefaultTypes = Electron.UserDefaultTypes;
25751
+ type WebAuthnAccount = Electron.WebAuthnAccount;
25628
25752
  type WebPreferences = Electron.WebPreferences;
25629
25753
  type WebRequestFilter = Electron.WebRequestFilter;
25630
25754
  type WebSource = Electron.WebSource;
@@ -25764,6 +25888,7 @@ declare namespace Electron {
25764
25888
  type Configuration = Electron.Configuration;
25765
25889
  type Configurations = Electron.Configurations;
25766
25890
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
25891
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
25767
25892
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
25768
25893
  type ContextMenuEvent = Electron.ContextMenuEvent;
25769
25894
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -25886,6 +26011,7 @@ declare namespace Electron {
25886
26011
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
25887
26012
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
25888
26013
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
26014
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
25889
26015
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
25890
26016
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
25891
26017
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -25951,6 +26077,7 @@ declare namespace Electron {
25951
26077
  type PageRanges = Electron.PageRanges;
25952
26078
  type Params = Electron.Params;
25953
26079
  type Planes = Electron.Planes;
26080
+ type TouchId = Electron.TouchId;
25954
26081
  type Video = Electron.Video;
25955
26082
  type Alternate = Electron.Alternate;
25956
26083
  type Alternates = Electron.Alternates;
@@ -26044,6 +26171,7 @@ declare namespace Electron {
26044
26171
  type UploadRawData = Electron.UploadRawData;
26045
26172
  type USBDevice = Electron.USBDevice;
26046
26173
  type UserDefaultTypes = Electron.UserDefaultTypes;
26174
+ type WebAuthnAccount = Electron.WebAuthnAccount;
26047
26175
  type WebPreferences = Electron.WebPreferences;
26048
26176
  type WebRequestFilter = Electron.WebRequestFilter;
26049
26177
  type WebSource = Electron.WebSource;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "41.4.0",
3
- "extractedAt": "2026-05-01T01:09:34.954Z"
2
+ "electronVersion": "41.5.1",
3
+ "extractedAt": "2026-05-09T01:03:49.834Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "41.4.0",
3
+ "version": "41.5.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",