electron-types 42.0.0-beta.8 → 42.0.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@42.0.0-beta.8
18
+ npm install -D electron-types@42.0.1
15
19
  # or
16
- yarn add -D electron-types@42.0.0-beta.8
20
+ yarn add -D electron-types@42.0.1
17
21
  # or
18
- pnpm add -D electron-types@42.0.0-beta.8
22
+ pnpm add -D electron-types@42.0.1
19
23
  ```
20
24
 
21
25
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 42.0.0-beta.8
1
+ // Type definitions for Electron 42.0.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
@@ -1042,6 +1042,26 @@ declare namespace Electron {
1042
1042
  * This API must be called after the `ready` event is emitted.
1043
1043
  */
1044
1044
  configureHostResolver(options: ConfigureHostResolverOptions): void;
1045
+ /**
1046
+ * Configures platform authenticators for the Web Authentication API
1047
+ * (`navigator.credentials.create()` / `navigator.credentials.get()`). Until this
1048
+ * is called, `PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()`
1049
+ * resolves to `false` and platform-authenticator requests are not serviced.
1050
+ *
1051
+ * When `touchID` is provided, WebAuthn credentials are stored in the macOS
1052
+ * keychain and bound to this device's Secure Enclave. Electron automatically
1053
+ * generates and persists a per-`session` metadata secret so that credentials
1054
+ * created in one partition are not visible to another.
1055
+ *
1056
+ * With the matching entitlement in your app's `entitlements.plist`:
1057
+ *
1058
+ * > [!NOTE] Touch ID WebAuthn credentials are device-bound and are not synced via
1059
+ * iCloud Keychain. They are only available on Macs with a Secure Enclave (Apple
1060
+ * silicon, or Intel Macs with a T2 chip).
1061
+ *
1062
+ * @platform darwin
1063
+ */
1064
+ configureWebAuthn(options: ConfigureWebAuthnOptions): void;
1045
1065
  /**
1046
1066
  * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain
1047
1067
  * basis if the GPU process crashes too frequently. This function disables that
@@ -12466,6 +12486,37 @@ declare namespace Electron {
12466
12486
  removeListener(event: 'select-usb-device', listener: (event: Event,
12467
12487
  details: SelectUsbDeviceDetails,
12468
12488
  callback: (deviceId?: string) => void) => void): this;
12489
+ /**
12490
+ * Emitted when a call to `navigator.credentials.get()` resolves multiple
12491
+ * discoverable WebAuthn credentials and the user must choose one. `callback`
12492
+ * should be called with the `credentialId` of the selected account; passing no
12493
+ * arguments — or a `credentialId` that does not match one of the provided accounts
12494
+ * — will cancel the request and the page will receive a `NotAllowedError`. If no
12495
+ * listener is registered for this event, the request is cancelled with the same
12496
+ * error. The credential request remains pending until the listener invokes the
12497
+ * callback, so always invoke it exactly once — typically from a `try { … } finally
12498
+ * { callback(…) }` block.
12499
+ *
12500
+ * On macOS, the Touch ID platform authenticator surfaces accounts via this event
12501
+ * once it has been configured with `app.configureWebAuthn`. The event may also
12502
+ * fire on other platforms when a roaming FIDO2 authenticator returns multiple
12503
+ * discoverable credentials.
12504
+ */
12505
+ on(event: 'select-webauthn-account', listener: (event: Event,
12506
+ details: SelectWebauthnAccountDetails,
12507
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12508
+ off(event: 'select-webauthn-account', listener: (event: Event,
12509
+ details: SelectWebauthnAccountDetails,
12510
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12511
+ once(event: 'select-webauthn-account', listener: (event: Event,
12512
+ details: SelectWebauthnAccountDetails,
12513
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12514
+ addListener(event: 'select-webauthn-account', listener: (event: Event,
12515
+ details: SelectWebauthnAccountDetails,
12516
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12517
+ removeListener(event: 'select-webauthn-account', listener: (event: Event,
12518
+ details: SelectWebauthnAccountDetails,
12519
+ callback: (credentialId?: (string) | (null)) => void) => void): this;
12469
12520
  /**
12470
12521
  * Emitted after `navigator.serial.requestPort` has been called and
12471
12522
  * `select-serial-port` has fired if a new serial port becomes available before the
@@ -15709,6 +15760,32 @@ declare namespace Electron {
15709
15760
  readonly children: View[];
15710
15761
  }
15711
15762
 
15763
+ interface WebAuthnAccount {
15764
+
15765
+ // Docs: https://electronjs.org/docs/api/structures/webauthn-account
15766
+
15767
+ /**
15768
+ * URL-safe base64-encoded (no padding) credential ID of the discoverable
15769
+ * credential. Matches `PublicKeyCredential.id` returned by
15770
+ * `navigator.credentials.get()` in the renderer.
15771
+ */
15772
+ credentialId: string;
15773
+ /**
15774
+ * Human-palatable name for the account, intended for display.
15775
+ */
15776
+ displayName?: string;
15777
+ /**
15778
+ * Human-palatable identifier for the account (for example, an email address or
15779
+ * username).
15780
+ */
15781
+ name?: string;
15782
+ /**
15783
+ * URL-safe base64-encoded (no padding) user handle (`user.id`) that was provided
15784
+ * when the credential was created.
15785
+ */
15786
+ userHandle?: string;
15787
+ }
15788
+
15712
15789
  class WebContents extends NodeEventEmitter {
15713
15790
 
15714
15791
  // Docs: https://electronjs.org/docs/api/web-contents
@@ -20495,6 +20572,14 @@ declare namespace Electron {
20495
20572
  enableAdditionalDnsQueryTypes?: boolean;
20496
20573
  }
20497
20574
 
20575
+ interface ConfigureWebAuthnOptions {
20576
+ /**
20577
+ * Enables the Touch ID / Secure Enclave platform authenticator for Web
20578
+ * Authentication requests.
20579
+ */
20580
+ touchID?: TouchId;
20581
+ }
20582
+
20498
20583
  interface ConsoleMessageEvent extends DOMEvent {
20499
20584
  /**
20500
20585
  * The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and
@@ -23051,6 +23136,19 @@ declare namespace Electron {
23051
23136
  frame: (WebFrameMain) | (null);
23052
23137
  }
23053
23138
 
23139
+ interface SelectWebauthnAccountDetails {
23140
+ /**
23141
+ * The relying party identifier from the WebAuthn request.
23142
+ */
23143
+ relyingPartyId: string;
23144
+ accounts: WebAuthnAccount[];
23145
+ /**
23146
+ * The frame initiating this event. May be `null` if accessed after the frame has
23147
+ * either navigated or been destroyed.
23148
+ */
23149
+ frame: (WebFrameMain) | (null);
23150
+ }
23151
+
23054
23152
  interface SendSharedTextureOptions {
23055
23153
  /**
23056
23154
  * The target frame to transfer the shared texture to. For `WebContents`, you can
@@ -24392,6 +24490,16 @@ declare namespace Electron {
24392
24490
  fd: number;
24393
24491
  }
24394
24492
 
24493
+ interface TouchId {
24494
+ /**
24495
+ * The keychain access group that WebAuthn credentials will be stored under. This
24496
+ * value **must** also be present in your app's `keychain-access-groups`
24497
+ * code-signing entitlement, and is typically of the form
24498
+ * `<TEAM_ID>.<BUNDLE_ID>.webauthn`.
24499
+ */
24500
+ keychainAccessGroup: string;
24501
+ }
24502
+
24395
24503
  interface Video {
24396
24504
  /**
24397
24505
  * The id of the stream being granted. This will usually come from a
@@ -24500,6 +24608,7 @@ declare namespace Electron {
24500
24608
  type Configuration = Electron.Configuration;
24501
24609
  type Configurations = Electron.Configurations;
24502
24610
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
24611
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
24503
24612
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
24504
24613
  type ContextMenuEvent = Electron.ContextMenuEvent;
24505
24614
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -24623,6 +24732,7 @@ declare namespace Electron {
24623
24732
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
24624
24733
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
24625
24734
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
24735
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
24626
24736
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
24627
24737
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
24628
24738
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -24689,6 +24799,7 @@ declare namespace Electron {
24689
24799
  type PageRanges = Electron.PageRanges;
24690
24800
  type Params = Electron.Params;
24691
24801
  type Planes = Electron.Planes;
24802
+ type TouchId = Electron.TouchId;
24692
24803
  type Video = Electron.Video;
24693
24804
  type Alternate = Electron.Alternate;
24694
24805
  type Alternates = Electron.Alternates;
@@ -24783,6 +24894,7 @@ declare namespace Electron {
24783
24894
  type UploadRawData = Electron.UploadRawData;
24784
24895
  type USBDevice = Electron.USBDevice;
24785
24896
  type UserDefaultTypes = Electron.UserDefaultTypes;
24897
+ type WebAuthnAccount = Electron.WebAuthnAccount;
24786
24898
  type WebPreferences = Electron.WebPreferences;
24787
24899
  type WebRequestFilter = Electron.WebRequestFilter;
24788
24900
  type WebSource = Electron.WebSource;
@@ -24902,6 +25014,7 @@ declare namespace Electron {
24902
25014
  type Configuration = Electron.Configuration;
24903
25015
  type Configurations = Electron.Configurations;
24904
25016
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
25017
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
24905
25018
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
24906
25019
  type ContextMenuEvent = Electron.ContextMenuEvent;
24907
25020
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -25025,6 +25138,7 @@ declare namespace Electron {
25025
25138
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
25026
25139
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
25027
25140
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
25141
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
25028
25142
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
25029
25143
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
25030
25144
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -25091,6 +25205,7 @@ declare namespace Electron {
25091
25205
  type PageRanges = Electron.PageRanges;
25092
25206
  type Params = Electron.Params;
25093
25207
  type Planes = Electron.Planes;
25208
+ type TouchId = Electron.TouchId;
25094
25209
  type Video = Electron.Video;
25095
25210
  type Alternate = Electron.Alternate;
25096
25211
  type Alternates = Electron.Alternates;
@@ -25185,6 +25300,7 @@ declare namespace Electron {
25185
25300
  type UploadRawData = Electron.UploadRawData;
25186
25301
  type USBDevice = Electron.USBDevice;
25187
25302
  type UserDefaultTypes = Electron.UserDefaultTypes;
25303
+ type WebAuthnAccount = Electron.WebAuthnAccount;
25188
25304
  type WebPreferences = Electron.WebPreferences;
25189
25305
  type WebRequestFilter = Electron.WebRequestFilter;
25190
25306
  type WebSource = Electron.WebSource;
@@ -25232,6 +25348,7 @@ declare namespace Electron {
25232
25348
  type Configuration = Electron.Configuration;
25233
25349
  type Configurations = Electron.Configurations;
25234
25350
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
25351
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
25235
25352
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
25236
25353
  type ContextMenuEvent = Electron.ContextMenuEvent;
25237
25354
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -25355,6 +25472,7 @@ declare namespace Electron {
25355
25472
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
25356
25473
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
25357
25474
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
25475
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
25358
25476
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
25359
25477
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
25360
25478
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -25421,6 +25539,7 @@ declare namespace Electron {
25421
25539
  type PageRanges = Electron.PageRanges;
25422
25540
  type Params = Electron.Params;
25423
25541
  type Planes = Electron.Planes;
25542
+ type TouchId = Electron.TouchId;
25424
25543
  type Video = Electron.Video;
25425
25544
  type Alternate = Electron.Alternate;
25426
25545
  type Alternates = Electron.Alternates;
@@ -25515,6 +25634,7 @@ declare namespace Electron {
25515
25634
  type UploadRawData = Electron.UploadRawData;
25516
25635
  type USBDevice = Electron.USBDevice;
25517
25636
  type UserDefaultTypes = Electron.UserDefaultTypes;
25637
+ type WebAuthnAccount = Electron.WebAuthnAccount;
25518
25638
  type WebPreferences = Electron.WebPreferences;
25519
25639
  type WebRequestFilter = Electron.WebRequestFilter;
25520
25640
  type WebSource = Electron.WebSource;
@@ -25561,6 +25681,7 @@ declare namespace Electron {
25561
25681
  type Configuration = Electron.Configuration;
25562
25682
  type Configurations = Electron.Configurations;
25563
25683
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
25684
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
25564
25685
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
25565
25686
  type ContextMenuEvent = Electron.ContextMenuEvent;
25566
25687
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -25684,6 +25805,7 @@ declare namespace Electron {
25684
25805
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
25685
25806
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
25686
25807
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
25808
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
25687
25809
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
25688
25810
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
25689
25811
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -25750,6 +25872,7 @@ declare namespace Electron {
25750
25872
  type PageRanges = Electron.PageRanges;
25751
25873
  type Params = Electron.Params;
25752
25874
  type Planes = Electron.Planes;
25875
+ type TouchId = Electron.TouchId;
25753
25876
  type Video = Electron.Video;
25754
25877
  type Alternate = Electron.Alternate;
25755
25878
  type Alternates = Electron.Alternates;
@@ -25844,6 +25967,7 @@ declare namespace Electron {
25844
25967
  type UploadRawData = Electron.UploadRawData;
25845
25968
  type USBDevice = Electron.USBDevice;
25846
25969
  type UserDefaultTypes = Electron.UserDefaultTypes;
25970
+ type WebAuthnAccount = Electron.WebAuthnAccount;
25847
25971
  type WebPreferences = Electron.WebPreferences;
25848
25972
  type WebRequestFilter = Electron.WebRequestFilter;
25849
25973
  type WebSource = Electron.WebSource;
@@ -25984,6 +26108,7 @@ declare namespace Electron {
25984
26108
  type Configuration = Electron.Configuration;
25985
26109
  type Configurations = Electron.Configurations;
25986
26110
  type ConfigureHostResolverOptions = Electron.ConfigureHostResolverOptions;
26111
+ type ConfigureWebAuthnOptions = Electron.ConfigureWebAuthnOptions;
25987
26112
  type ConsoleMessageEvent = Electron.ConsoleMessageEvent;
25988
26113
  type ContextMenuEvent = Electron.ContextMenuEvent;
25989
26114
  type ContextMenuParams = Electron.ContextMenuParams;
@@ -26107,6 +26232,7 @@ declare namespace Electron {
26107
26232
  type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions;
26108
26233
  type SelectHidDeviceDetails = Electron.SelectHidDeviceDetails;
26109
26234
  type SelectUsbDeviceDetails = Electron.SelectUsbDeviceDetails;
26235
+ type SelectWebauthnAccountDetails = Electron.SelectWebauthnAccountDetails;
26110
26236
  type SendSharedTextureOptions = Electron.SendSharedTextureOptions;
26111
26237
  type SerialPortRevokedDetails = Electron.SerialPortRevokedDetails;
26112
26238
  type ServiceWorkersRunningStatusChangedEventParams = Electron.ServiceWorkersRunningStatusChangedEventParams;
@@ -26173,6 +26299,7 @@ declare namespace Electron {
26173
26299
  type PageRanges = Electron.PageRanges;
26174
26300
  type Params = Electron.Params;
26175
26301
  type Planes = Electron.Planes;
26302
+ type TouchId = Electron.TouchId;
26176
26303
  type Video = Electron.Video;
26177
26304
  type Alternate = Electron.Alternate;
26178
26305
  type Alternates = Electron.Alternates;
@@ -26267,6 +26394,7 @@ declare namespace Electron {
26267
26394
  type UploadRawData = Electron.UploadRawData;
26268
26395
  type USBDevice = Electron.USBDevice;
26269
26396
  type UserDefaultTypes = Electron.UserDefaultTypes;
26397
+ type WebAuthnAccount = Electron.WebAuthnAccount;
26270
26398
  type WebPreferences = Electron.WebPreferences;
26271
26399
  type WebRequestFilter = Electron.WebRequestFilter;
26272
26400
  type WebSource = Electron.WebSource;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "42.0.0-beta.8",
3
- "extractedAt": "2026-05-01T12:33:04.482Z"
2
+ "electronVersion": "42.0.1",
3
+ "extractedAt": "2026-05-09T01:03:50.343Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "42.0.0-beta.8",
3
+ "version": "42.0.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",