electron-types 45.0.0-beta.5 → 45.0.0-beta.6

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@45.0.0-beta.5
17
+ npm install -D electron-types@45.0.0-beta.6
18
18
  # or
19
- yarn add -D electron-types@45.0.0-beta.5
19
+ yarn add -D electron-types@45.0.0-beta.6
20
20
  # or
21
- pnpm add -D electron-types@45.0.0-beta.5
21
+ pnpm add -D electron-types@45.0.0-beta.6
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 45.0.0-beta.5
1
+ // Type definitions for Electron 45.0.0-beta.6
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
@@ -187,6 +187,96 @@ declare namespace Electron {
187
187
  * Contains app-specific state stored by the activity.
188
188
  */
189
189
  userInfo: unknown) => void): this;
190
+ /**
191
+ * Emitted when an app shim connects to your app. Shims can only connect after
192
+ * `app.startAppShimServer()` has been called.
193
+ *
194
+ * Any process running as the same user can connect. Verify the shim before
195
+ * creating windows in it, for example with `shim.satisfiesCodeRequirement()`, and
196
+ * call `shim.quit()` to reject a shim that you do not trust.
197
+ *
198
+ * @experimental
199
+ * @platform darwin
200
+ */
201
+ on(event: 'app-shim-connected', listener: (event: Event,
202
+ shim: AppShimHost) => void): this;
203
+ /**
204
+ * @experimental
205
+ * @platform darwin
206
+ */
207
+ off(event: 'app-shim-connected', listener: (event: Event,
208
+ shim: AppShimHost) => void): this;
209
+ /**
210
+ * @experimental
211
+ * @platform darwin
212
+ */
213
+ once(event: 'app-shim-connected', listener: (event: Event,
214
+ shim: AppShimHost) => void): this;
215
+ /**
216
+ * @experimental
217
+ * @platform darwin
218
+ */
219
+ addListener(event: 'app-shim-connected', listener: (event: Event,
220
+ shim: AppShimHost) => void): this;
221
+ /**
222
+ * @experimental
223
+ * @platform darwin
224
+ */
225
+ removeListener(event: 'app-shim-connected', listener: (event: Event,
226
+ shim: AppShimHost) => void): this;
227
+ /**
228
+ * Emitted when an app shim was launched but could not connect because your app's
229
+ * bundle has been replaced by a different version since your app started. A shim
230
+ * loads the version of Electron that is on disk, which cannot communicate with the
231
+ * version that is still running.
232
+ *
233
+ * The shim quits without showing any UI, so use this event to tell the user what
234
+ * happened. Shims can connect again after your app restarts.
235
+ *
236
+ * @experimental
237
+ * @platform darwin
238
+ */
239
+ on(event: 'app-shim-version-mismatch', listener: (event: Event,
240
+ /**
241
+ * The path of the app shim's bundle.
242
+ */
243
+ bundlePath: string) => void): this;
244
+ /**
245
+ * @experimental
246
+ * @platform darwin
247
+ */
248
+ off(event: 'app-shim-version-mismatch', listener: (event: Event,
249
+ /**
250
+ * The path of the app shim's bundle.
251
+ */
252
+ bundlePath: string) => void): this;
253
+ /**
254
+ * @experimental
255
+ * @platform darwin
256
+ */
257
+ once(event: 'app-shim-version-mismatch', listener: (event: Event,
258
+ /**
259
+ * The path of the app shim's bundle.
260
+ */
261
+ bundlePath: string) => void): this;
262
+ /**
263
+ * @experimental
264
+ * @platform darwin
265
+ */
266
+ addListener(event: 'app-shim-version-mismatch', listener: (event: Event,
267
+ /**
268
+ * The path of the app shim's bundle.
269
+ */
270
+ bundlePath: string) => void): this;
271
+ /**
272
+ * @experimental
273
+ * @platform darwin
274
+ */
275
+ removeListener(event: 'app-shim-version-mismatch', listener: (event: Event,
276
+ /**
277
+ * The path of the app shim's bundle.
278
+ */
279
+ bundlePath: string) => void): this;
190
280
  /**
191
281
  * Emitted before the application starts closing its windows. Calling
192
282
  * `event.preventDefault()` will prevent the default behavior, which is terminating
@@ -1978,6 +2068,28 @@ declare namespace Electron {
1978
2068
  * @platform mas
1979
2069
  */
1980
2070
  startAccessingSecurityScopedResource(bookmarkData: string): Function;
2071
+ /**
2072
+ * Starts accepting connections from app shims. An `app-shim-connected` event is
2073
+ * emitted for each shim that connects.
2074
+ *
2075
+ * Throws if the server cannot be started, for example because another copy of your
2076
+ * app has already started a server with the same `name`.
2077
+ *
2078
+ * This method can only be called after the app is ready. It is not available in
2079
+ * Mac App Store builds.
2080
+ *
2081
+ * @experimental
2082
+ * @platform darwin
2083
+ */
2084
+ startAppShimServer(options?: StartAppShimServerOptions): void;
2085
+ /**
2086
+ * Stops accepting connections from app shims. Shims that have already connected
2087
+ * stay connected.
2088
+ *
2089
+ * @experimental
2090
+ * @platform darwin
2091
+ */
2092
+ stopAppShimServer(): void;
1981
2093
  /**
1982
2094
  * Updates the current activity if its type matches `type`, merging the entries
1983
2095
  * from `userInfo` into its current `userInfo` dictionary.
@@ -2088,6 +2200,230 @@ declare namespace Electron {
2088
2200
  userAgentFallback: string;
2089
2201
  }
2090
2202
 
2203
+ class AppShimHost extends NodeEventEmitter {
2204
+
2205
+ // Docs: https://electronjs.org/docs/api/app-shim-host
2206
+
2207
+ /**
2208
+ * Emitted when the user clicks the shim's Dock icon, or launches the shim again
2209
+ * while it is already running.
2210
+ *
2211
+ * @experimental
2212
+ */
2213
+ on(event: 'activate', listener: (event: Event,
2214
+ hasVisibleWindows: boolean) => void): this;
2215
+ /**
2216
+ * @experimental
2217
+ */
2218
+ off(event: 'activate', listener: (event: Event,
2219
+ hasVisibleWindows: boolean) => void): this;
2220
+ /**
2221
+ * @experimental
2222
+ */
2223
+ once(event: 'activate', listener: (event: Event,
2224
+ hasVisibleWindows: boolean) => void): this;
2225
+ /**
2226
+ * @experimental
2227
+ */
2228
+ addListener(event: 'activate', listener: (event: Event,
2229
+ hasVisibleWindows: boolean) => void): this;
2230
+ /**
2231
+ * @experimental
2232
+ */
2233
+ removeListener(event: 'activate', listener: (event: Event,
2234
+ hasVisibleWindows: boolean) => void): this;
2235
+ /**
2236
+ * Emitted when the shim's process has exited or its connection was lost. All
2237
+ * windows that were created in the shim have already been closed.
2238
+ *
2239
+ * @experimental
2240
+ */
2241
+ on(event: 'disconnected', listener: (event: Event) => void): this;
2242
+ /**
2243
+ * @experimental
2244
+ */
2245
+ off(event: 'disconnected', listener: (event: Event) => void): this;
2246
+ /**
2247
+ * @experimental
2248
+ */
2249
+ once(event: 'disconnected', listener: (event: Event) => void): this;
2250
+ /**
2251
+ * @experimental
2252
+ */
2253
+ addListener(event: 'disconnected', listener: (event: Event) => void): this;
2254
+ /**
2255
+ * @experimental
2256
+ */
2257
+ removeListener(event: 'disconnected', listener: (event: Event) => void): this;
2258
+ /**
2259
+ * Emitted when the user opens a file with the shim.
2260
+ *
2261
+ * @experimental
2262
+ */
2263
+ on(event: 'open-file', listener: (event: Event,
2264
+ path: string) => void): this;
2265
+ /**
2266
+ * @experimental
2267
+ */
2268
+ off(event: 'open-file', listener: (event: Event,
2269
+ path: string) => void): this;
2270
+ /**
2271
+ * @experimental
2272
+ */
2273
+ once(event: 'open-file', listener: (event: Event,
2274
+ path: string) => void): this;
2275
+ /**
2276
+ * @experimental
2277
+ */
2278
+ addListener(event: 'open-file', listener: (event: Event,
2279
+ path: string) => void): this;
2280
+ /**
2281
+ * @experimental
2282
+ */
2283
+ removeListener(event: 'open-file', listener: (event: Event,
2284
+ path: string) => void): this;
2285
+ /**
2286
+ * Emitted when the user opens a URL with the shim.
2287
+ *
2288
+ * @experimental
2289
+ */
2290
+ on(event: 'open-url', listener: (event: Event,
2291
+ url: string) => void): this;
2292
+ /**
2293
+ * @experimental
2294
+ */
2295
+ off(event: 'open-url', listener: (event: Event,
2296
+ url: string) => void): this;
2297
+ /**
2298
+ * @experimental
2299
+ */
2300
+ once(event: 'open-url', listener: (event: Event,
2301
+ url: string) => void): this;
2302
+ /**
2303
+ * @experimental
2304
+ */
2305
+ addListener(event: 'open-url', listener: (event: Event,
2306
+ url: string) => void): this;
2307
+ /**
2308
+ * @experimental
2309
+ */
2310
+ removeListener(event: 'open-url', listener: (event: Event,
2311
+ url: string) => void): this;
2312
+ /**
2313
+ * Emitted when the shim is asked to quit: by the user, for example with Cmd+Q or
2314
+ * from its Dock menu, or by macOS at logout.
2315
+ *
2316
+ * By default, the shim quits and its windows are closed without emitting their
2317
+ * `close` events. To keep the shim running, call `event.preventDefault()`. You can
2318
+ * then close its windows yourself and call `shim.quit()` when you are done.
2319
+ *
2320
+ * `event.preventDefault()` must be called synchronously in the listener. If your
2321
+ * app's main process is unresponsive for more than five seconds, the shim quits
2322
+ * without waiting for it.
2323
+ *
2324
+ * @experimental
2325
+ */
2326
+ on(event: 'quit-requested', listener: (event: Event) => void): this;
2327
+ /**
2328
+ * @experimental
2329
+ */
2330
+ off(event: 'quit-requested', listener: (event: Event) => void): this;
2331
+ /**
2332
+ * @experimental
2333
+ */
2334
+ once(event: 'quit-requested', listener: (event: Event) => void): this;
2335
+ /**
2336
+ * @experimental
2337
+ */
2338
+ addListener(event: 'quit-requested', listener: (event: Event) => void): this;
2339
+ /**
2340
+ * @experimental
2341
+ */
2342
+ removeListener(event: 'quit-requested', listener: (event: Event) => void): this;
2343
+ /**
2344
+ * Bounces the shim's Dock icon, in the same way that `dock.bounce()` bounces your
2345
+ * app's.
2346
+ *
2347
+ * @experimental
2348
+ */
2349
+ bounce(type?: 'critical' | 'informational'): void;
2350
+ /**
2351
+ * Cancels a bounce started by `shim.bounce()`.
2352
+ *
2353
+ * @experimental
2354
+ */
2355
+ cancelBounce(): void;
2356
+ /**
2357
+ * Whether the shim's process is still connected.
2358
+ *
2359
+ * @experimental
2360
+ */
2361
+ isConnected(): boolean;
2362
+ /**
2363
+ * Quits the shim's process and closes its windows. The windows do not emit `close`
2364
+ * events. They emit `closed` shortly after this method returns.
2365
+ * `shim.isConnected()` returns `false` as soon as this method returns.
2366
+ *
2367
+ * @experimental
2368
+ */
2369
+ quit(): void;
2370
+ /**
2371
+ * Whether the code signature of the shim's process satisfies `requirement`. The
2372
+ * check is performed on the running process that connected, not on the bundle at
2373
+ * `shim.bundlePath`.
2374
+ *
2375
+ * Throws if `requirement` cannot be parsed.
2376
+ *
2377
+ * @experimental
2378
+ */
2379
+ satisfiesCodeRequirement(requirement: string): boolean;
2380
+ /**
2381
+ * Sets the menu bar that is shown while the shim is the active app. This is the
2382
+ * shim's equivalent of `Menu.setApplicationMenu()`. Passing `null` restores the
2383
+ * shim's minimal default menu.
2384
+ *
2385
+ * The `click` handlers of the menu's items and the menu's `menu-will-show` event
2386
+ * run in your app's main process. Items with a `role` act on the shim instead of
2387
+ * your app: for example, the `quit` role quits the shim. The default labels of the
2388
+ * `about`, `hide` and `quit` roles use the shim's name.
2389
+ *
2390
+ * The shim displays the menu's items as they were when this method was called.
2391
+ * Later changes to an item's `label`, `enabled`, `checked` or `visible` properties
2392
+ * are applied when the shim becomes the active app, when one of its menus is
2393
+ * opened, and after an item is clicked.
2394
+ *
2395
+ * @experimental
2396
+ */
2397
+ setApplicationMenu(menu: (Menu) | (null)): void;
2398
+ /**
2399
+ * Sets the text displayed on the shim's Dock icon. An empty string clears it.
2400
+ *
2401
+ * @experimental
2402
+ */
2403
+ setBadge(text: string): void;
2404
+ /**
2405
+ * A `string` representing the bundle identifier from that bundle's `Info.plist`.
2406
+ * This value is not verified, so do not use it to decide whether to trust the
2407
+ * shim. Use `shim.satisfiesCodeRequirement()` instead.
2408
+ *
2409
+ * @experimental
2410
+ */
2411
+ readonly bundleId: string;
2412
+ /**
2413
+ * A `string` representing the path of the app bundle that the shim's process was
2414
+ * launched from.
2415
+ *
2416
+ * @experimental
2417
+ */
2418
+ readonly bundlePath: string;
2419
+ /**
2420
+ * A `number` representing the process ID of the shim.
2421
+ *
2422
+ * @experimental
2423
+ */
2424
+ readonly pid: number;
2425
+ }
2426
+
2091
2427
  interface AutoUpdater extends NodeJS.EventEmitter {
2092
2428
 
2093
2429
  // Docs: https://electronjs.org/docs/api/auto-updater
@@ -3464,6 +3800,16 @@ declare namespace Electron {
3464
3800
  * Linux this is supported on both X11 and Wayland. On X11 the X server has applied
3465
3801
  * the window's new input shape when the call returns; on Wayland the new input
3466
3802
  * region is applied with the window's next frame.
3803
+ *
3804
+ * > [!NOTE] On Windows, `forward: true` stops working temporarily when the active
3805
+ * window is running at a higher integrity level (e.g., elevated/Administrator)
3806
+ * than your Electron app. Since Electron typically runs at standard user
3807
+ * privilege, this occurs when an elevated window—such as Task Manager or an
3808
+ * installer—takes focus. This is due to User Interface Privacy Isolation (UIPI).
3809
+ *
3810
+ * To work around it, your app must be run with Administrator privileges or
3811
+ * configured with UIAccess privileges (see the Background section under the
3812
+ * Reference section of this page).
3467
3813
  */
3468
3814
  setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
3469
3815
  /**
@@ -3925,6 +4271,15 @@ declare namespace Electron {
3925
4271
  * `false`. Not supported on Wayland (Linux).
3926
4272
  */
3927
4273
  alwaysOnTop?: boolean;
4274
+ /**
4275
+ * Creates the native window in the process of this app shim, so that it belongs to
4276
+ * the shim's Dock icon and not to your app's. See AppShimHost for what affordances
4277
+ * are granted to the window.
4278
+ *
4279
+ * @experimental
4280
+ * @platform darwin
4281
+ */
4282
+ appShim?: AppShimHost;
3928
4283
  /**
3929
4284
  * Auto hide the menu bar unless the `Alt` key is pressed. Default is `false`.
3930
4285
  *
@@ -6299,6 +6654,16 @@ declare namespace Electron {
6299
6654
  * Linux this is supported on both X11 and Wayland. On X11 the X server has applied
6300
6655
  * the window's new input shape when the call returns; on Wayland the new input
6301
6656
  * region is applied with the window's next frame.
6657
+ *
6658
+ * > [!NOTE] On Windows, `forward: true` stops working temporarily when the active
6659
+ * window is running at a higher integrity level (e.g., elevated/Administrator)
6660
+ * than your Electron app. Since Electron typically runs at standard user
6661
+ * privilege, this occurs when an elevated window—such as Task Manager or an
6662
+ * installer—takes focus. This is due to User Interface Privacy Isolation (UIPI).
6663
+ *
6664
+ * To work around it, your app must be run with Administrator privileges or
6665
+ * configured with UIAccess privileges (see the Background section under the
6666
+ * Reference section of this page).
6302
6667
  */
6303
6668
  setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
6304
6669
  /**
@@ -24508,6 +24873,16 @@ declare namespace Electron {
24508
24873
  fetchWindowIcons?: boolean;
24509
24874
  }
24510
24875
 
24876
+ interface StartAppShimServerOptions {
24877
+ /**
24878
+ * A name for this server, which lets several running copies of your app each have
24879
+ * their own. It can only contain letters, digits, `.`, `-` and `_`, and must match
24880
+ * the `ElectronAppShimServerName` of the shims that connect to it. Default is
24881
+ * `appshim`.
24882
+ */
24883
+ name?: string;
24884
+ }
24885
+
24511
24886
  interface StartLoggingOptions {
24512
24887
  /**
24513
24888
  * What kinds of data should be captured. By default, only metadata about requests
@@ -25994,6 +26369,7 @@ declare namespace Electron {
25994
26369
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
25995
26370
  type Source = Electron.Source;
25996
26371
  type SourcesOptions = Electron.SourcesOptions;
26372
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
25997
26373
  type StartLoggingOptions = Electron.StartLoggingOptions;
25998
26374
  type StartTask = Electron.StartTask;
25999
26375
  type Streams = Electron.Streams;
@@ -26177,6 +26553,7 @@ declare namespace Electron {
26177
26553
  type Event<Params extends object = {}> = Electron.Event<Params>;
26178
26554
  const app: App;
26179
26555
  type App = Electron.App;
26556
+ type AppShimHost = Electron.AppShimHost;
26180
26557
  const autoUpdater: AutoUpdater;
26181
26558
  type AutoUpdater = Electron.AutoUpdater;
26182
26559
  class BaseWindow extends Electron.BaseWindow {}
@@ -26423,6 +26800,7 @@ declare namespace Electron {
26423
26800
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
26424
26801
  type Source = Electron.Source;
26425
26802
  type SourcesOptions = Electron.SourcesOptions;
26803
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
26426
26804
  type StartLoggingOptions = Electron.StartLoggingOptions;
26427
26805
  type StartTask = Electron.StartTask;
26428
26806
  type Streams = Electron.Streams;
@@ -26776,6 +27154,7 @@ declare namespace Electron {
26776
27154
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
26777
27155
  type Source = Electron.Source;
26778
27156
  type SourcesOptions = Electron.SourcesOptions;
27157
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
26779
27158
  type StartLoggingOptions = Electron.StartLoggingOptions;
26780
27159
  type StartTask = Electron.StartTask;
26781
27160
  type Streams = Electron.Streams;
@@ -27131,6 +27510,7 @@ declare namespace Electron {
27131
27510
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
27132
27511
  type Source = Electron.Source;
27133
27512
  type SourcesOptions = Electron.SourcesOptions;
27513
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
27134
27514
  type StartLoggingOptions = Electron.StartLoggingOptions;
27135
27515
  type StartTask = Electron.StartTask;
27136
27516
  type Streams = Electron.Streams;
@@ -27314,6 +27694,7 @@ declare namespace Electron {
27314
27694
  type Event<Params extends object = {}> = Electron.Event<Params>;
27315
27695
  const app: App;
27316
27696
  type App = Electron.App;
27697
+ type AppShimHost = Electron.AppShimHost;
27317
27698
  const autoUpdater: AutoUpdater;
27318
27699
  type AutoUpdater = Electron.AutoUpdater;
27319
27700
  class BaseWindow extends Electron.BaseWindow {}
@@ -27582,6 +27963,7 @@ declare namespace Electron {
27582
27963
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
27583
27964
  type Source = Electron.Source;
27584
27965
  type SourcesOptions = Electron.SourcesOptions;
27966
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
27585
27967
  type StartLoggingOptions = Electron.StartLoggingOptions;
27586
27968
  type StartTask = Electron.StartTask;
27587
27969
  type Streams = Electron.Streams;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "45.0.0-beta.5",
3
- "extractedAt": "2026-10-16T06:22:07.597Z"
2
+ "electronVersion": "45.0.0-beta.6",
3
+ "extractedAt": "2026-10-20T15:12:55.284Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "45.0.0-beta.5",
3
+ "version": "45.0.0-beta.6",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",