electron-types 44.8.0 → 44.9.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
@@ -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@44.8.0
17
+ npm install -D electron-types@44.9.1
18
18
  # or
19
- yarn add -D electron-types@44.8.0
19
+ yarn add -D electron-types@44.9.1
20
20
  # or
21
- pnpm add -D electron-types@44.8.0
21
+ pnpm add -D electron-types@44.9.1
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 44.8.0
1
+ // Type definitions for Electron 44.9.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
@@ -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
@@ -1905,6 +1995,28 @@ declare namespace Electron {
1905
1995
  * @platform mas
1906
1996
  */
1907
1997
  startAccessingSecurityScopedResource(bookmarkData: string): Function;
1998
+ /**
1999
+ * Starts accepting connections from app shims. An `app-shim-connected` event is
2000
+ * emitted for each shim that connects.
2001
+ *
2002
+ * Throws if the server cannot be started, for example because another copy of your
2003
+ * app has already started a server with the same `name`.
2004
+ *
2005
+ * This method can only be called after the app is ready. It is not available in
2006
+ * Mac App Store builds.
2007
+ *
2008
+ * @experimental
2009
+ * @platform darwin
2010
+ */
2011
+ startAppShimServer(options?: StartAppShimServerOptions): void;
2012
+ /**
2013
+ * Stops accepting connections from app shims. Shims that have already connected
2014
+ * stay connected.
2015
+ *
2016
+ * @experimental
2017
+ * @platform darwin
2018
+ */
2019
+ stopAppShimServer(): void;
1908
2020
  /**
1909
2021
  * Updates the current activity if its type matches `type`, merging the entries
1910
2022
  * from `userInfo` into its current `userInfo` dictionary.
@@ -2012,6 +2124,230 @@ declare namespace Electron {
2012
2124
  userAgentFallback: string;
2013
2125
  }
2014
2126
 
2127
+ class AppShimHost extends NodeEventEmitter {
2128
+
2129
+ // Docs: https://electronjs.org/docs/api/app-shim-host
2130
+
2131
+ /**
2132
+ * Emitted when the user clicks the shim's Dock icon, or launches the shim again
2133
+ * while it is already running.
2134
+ *
2135
+ * @experimental
2136
+ */
2137
+ on(event: 'activate', listener: (event: Event,
2138
+ hasVisibleWindows: boolean) => void): this;
2139
+ /**
2140
+ * @experimental
2141
+ */
2142
+ off(event: 'activate', listener: (event: Event,
2143
+ hasVisibleWindows: boolean) => void): this;
2144
+ /**
2145
+ * @experimental
2146
+ */
2147
+ once(event: 'activate', listener: (event: Event,
2148
+ hasVisibleWindows: boolean) => void): this;
2149
+ /**
2150
+ * @experimental
2151
+ */
2152
+ addListener(event: 'activate', listener: (event: Event,
2153
+ hasVisibleWindows: boolean) => void): this;
2154
+ /**
2155
+ * @experimental
2156
+ */
2157
+ removeListener(event: 'activate', listener: (event: Event,
2158
+ hasVisibleWindows: boolean) => void): this;
2159
+ /**
2160
+ * Emitted when the shim's process has exited or its connection was lost. All
2161
+ * windows that were created in the shim have already been closed.
2162
+ *
2163
+ * @experimental
2164
+ */
2165
+ on(event: 'disconnected', listener: (event: Event) => void): this;
2166
+ /**
2167
+ * @experimental
2168
+ */
2169
+ off(event: 'disconnected', listener: (event: Event) => void): this;
2170
+ /**
2171
+ * @experimental
2172
+ */
2173
+ once(event: 'disconnected', listener: (event: Event) => void): this;
2174
+ /**
2175
+ * @experimental
2176
+ */
2177
+ addListener(event: 'disconnected', listener: (event: Event) => void): this;
2178
+ /**
2179
+ * @experimental
2180
+ */
2181
+ removeListener(event: 'disconnected', listener: (event: Event) => void): this;
2182
+ /**
2183
+ * Emitted when the user opens a file with the shim.
2184
+ *
2185
+ * @experimental
2186
+ */
2187
+ on(event: 'open-file', listener: (event: Event,
2188
+ path: string) => void): this;
2189
+ /**
2190
+ * @experimental
2191
+ */
2192
+ off(event: 'open-file', listener: (event: Event,
2193
+ path: string) => void): this;
2194
+ /**
2195
+ * @experimental
2196
+ */
2197
+ once(event: 'open-file', listener: (event: Event,
2198
+ path: string) => void): this;
2199
+ /**
2200
+ * @experimental
2201
+ */
2202
+ addListener(event: 'open-file', listener: (event: Event,
2203
+ path: string) => void): this;
2204
+ /**
2205
+ * @experimental
2206
+ */
2207
+ removeListener(event: 'open-file', listener: (event: Event,
2208
+ path: string) => void): this;
2209
+ /**
2210
+ * Emitted when the user opens a URL with the shim.
2211
+ *
2212
+ * @experimental
2213
+ */
2214
+ on(event: 'open-url', listener: (event: Event,
2215
+ url: string) => void): this;
2216
+ /**
2217
+ * @experimental
2218
+ */
2219
+ off(event: 'open-url', listener: (event: Event,
2220
+ url: string) => void): this;
2221
+ /**
2222
+ * @experimental
2223
+ */
2224
+ once(event: 'open-url', listener: (event: Event,
2225
+ url: string) => void): this;
2226
+ /**
2227
+ * @experimental
2228
+ */
2229
+ addListener(event: 'open-url', listener: (event: Event,
2230
+ url: string) => void): this;
2231
+ /**
2232
+ * @experimental
2233
+ */
2234
+ removeListener(event: 'open-url', listener: (event: Event,
2235
+ url: string) => void): this;
2236
+ /**
2237
+ * Emitted when the shim is asked to quit: by the user, for example with Cmd+Q or
2238
+ * from its Dock menu, or by macOS at logout.
2239
+ *
2240
+ * By default, the shim quits and its windows are closed without emitting their
2241
+ * `close` events. To keep the shim running, call `event.preventDefault()`. You can
2242
+ * then close its windows yourself and call `shim.quit()` when you are done.
2243
+ *
2244
+ * `event.preventDefault()` must be called synchronously in the listener. If your
2245
+ * app's main process is unresponsive for more than five seconds, the shim quits
2246
+ * without waiting for it.
2247
+ *
2248
+ * @experimental
2249
+ */
2250
+ on(event: 'quit-requested', listener: (event: Event) => void): this;
2251
+ /**
2252
+ * @experimental
2253
+ */
2254
+ off(event: 'quit-requested', listener: (event: Event) => void): this;
2255
+ /**
2256
+ * @experimental
2257
+ */
2258
+ once(event: 'quit-requested', listener: (event: Event) => void): this;
2259
+ /**
2260
+ * @experimental
2261
+ */
2262
+ addListener(event: 'quit-requested', listener: (event: Event) => void): this;
2263
+ /**
2264
+ * @experimental
2265
+ */
2266
+ removeListener(event: 'quit-requested', listener: (event: Event) => void): this;
2267
+ /**
2268
+ * Bounces the shim's Dock icon, in the same way that `dock.bounce()` bounces your
2269
+ * app's.
2270
+ *
2271
+ * @experimental
2272
+ */
2273
+ bounce(type?: 'critical' | 'informational'): void;
2274
+ /**
2275
+ * Cancels a bounce started by `shim.bounce()`.
2276
+ *
2277
+ * @experimental
2278
+ */
2279
+ cancelBounce(): void;
2280
+ /**
2281
+ * Whether the shim's process is still connected.
2282
+ *
2283
+ * @experimental
2284
+ */
2285
+ isConnected(): boolean;
2286
+ /**
2287
+ * Quits the shim's process and closes its windows. The windows do not emit `close`
2288
+ * events. They emit `closed` shortly after this method returns.
2289
+ * `shim.isConnected()` returns `false` as soon as this method returns.
2290
+ *
2291
+ * @experimental
2292
+ */
2293
+ quit(): void;
2294
+ /**
2295
+ * Whether the code signature of the shim's process satisfies `requirement`. The
2296
+ * check is performed on the running process that connected, not on the bundle at
2297
+ * `shim.bundlePath`.
2298
+ *
2299
+ * Throws if `requirement` cannot be parsed.
2300
+ *
2301
+ * @experimental
2302
+ */
2303
+ satisfiesCodeRequirement(requirement: string): boolean;
2304
+ /**
2305
+ * Sets the menu bar that is shown while the shim is the active app. This is the
2306
+ * shim's equivalent of `Menu.setApplicationMenu()`. Passing `null` restores the
2307
+ * shim's minimal default menu.
2308
+ *
2309
+ * The `click` handlers of the menu's items and the menu's `menu-will-show` event
2310
+ * run in your app's main process. Items with a `role` act on the shim instead of
2311
+ * your app: for example, the `quit` role quits the shim. The default labels of the
2312
+ * `about`, `hide` and `quit` roles use the shim's name.
2313
+ *
2314
+ * The shim displays the menu's items as they were when this method was called.
2315
+ * Later changes to an item's `label`, `enabled`, `checked` or `visible` properties
2316
+ * are applied when the shim becomes the active app, when one of its menus is
2317
+ * opened, and after an item is clicked.
2318
+ *
2319
+ * @experimental
2320
+ */
2321
+ setApplicationMenu(menu: (Menu) | (null)): void;
2322
+ /**
2323
+ * Sets the text displayed on the shim's Dock icon. An empty string clears it.
2324
+ *
2325
+ * @experimental
2326
+ */
2327
+ setBadge(text: string): void;
2328
+ /**
2329
+ * A `string` representing the bundle identifier from that bundle's `Info.plist`.
2330
+ * This value is not verified, so do not use it to decide whether to trust the
2331
+ * shim. Use `shim.satisfiesCodeRequirement()` instead.
2332
+ *
2333
+ * @experimental
2334
+ */
2335
+ readonly bundleId: string;
2336
+ /**
2337
+ * A `string` representing the path of the app bundle that the shim's process was
2338
+ * launched from.
2339
+ *
2340
+ * @experimental
2341
+ */
2342
+ readonly bundlePath: string;
2343
+ /**
2344
+ * A `number` representing the process ID of the shim.
2345
+ *
2346
+ * @experimental
2347
+ */
2348
+ readonly pid: number;
2349
+ }
2350
+
2015
2351
  interface AutoUpdater extends NodeJS.EventEmitter {
2016
2352
 
2017
2353
  // Docs: https://electronjs.org/docs/api/auto-updater
@@ -3849,6 +4185,15 @@ declare namespace Electron {
3849
4185
  * `false`. Not supported on Wayland (Linux).
3850
4186
  */
3851
4187
  alwaysOnTop?: boolean;
4188
+ /**
4189
+ * Creates the native window in the process of this app shim, so that it belongs to
4190
+ * the shim's Dock icon and not to your app's. See AppShimHost for what affordances
4191
+ * are granted to the window.
4192
+ *
4193
+ * @experimental
4194
+ * @platform darwin
4195
+ */
4196
+ appShim?: AppShimHost;
3852
4197
  /**
3853
4198
  * Auto hide the menu bar unless the `Alt` key is pressed. Default is `false`.
3854
4199
  *
@@ -24098,6 +24443,16 @@ declare namespace Electron {
24098
24443
  fetchWindowIcons?: boolean;
24099
24444
  }
24100
24445
 
24446
+ interface StartAppShimServerOptions {
24447
+ /**
24448
+ * A name for this server, which lets several running copies of your app each have
24449
+ * their own. It can only contain letters, digits, `.`, `-` and `_`, and must match
24450
+ * the `ElectronAppShimServerName` of the shims that connect to it. Default is
24451
+ * `appshim`.
24452
+ */
24453
+ name?: string;
24454
+ }
24455
+
24101
24456
  interface StartLoggingOptions {
24102
24457
  /**
24103
24458
  * What kinds of data should be captured. By default, only metadata about requests
@@ -25580,6 +25935,7 @@ declare namespace Electron {
25580
25935
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
25581
25936
  type Source = Electron.Source;
25582
25937
  type SourcesOptions = Electron.SourcesOptions;
25938
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
25583
25939
  type StartLoggingOptions = Electron.StartLoggingOptions;
25584
25940
  type StartTask = Electron.StartTask;
25585
25941
  type Streams = Electron.Streams;
@@ -25755,6 +26111,7 @@ declare namespace Electron {
25755
26111
  type Event<Params extends object = {}> = Electron.Event<Params>;
25756
26112
  const app: App;
25757
26113
  type App = Electron.App;
26114
+ type AppShimHost = Electron.AppShimHost;
25758
26115
  const autoUpdater: AutoUpdater;
25759
26116
  type AutoUpdater = Electron.AutoUpdater;
25760
26117
  class BaseWindow extends Electron.BaseWindow {}
@@ -25997,6 +26354,7 @@ declare namespace Electron {
25997
26354
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
25998
26355
  type Source = Electron.Source;
25999
26356
  type SourcesOptions = Electron.SourcesOptions;
26357
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
26000
26358
  type StartLoggingOptions = Electron.StartLoggingOptions;
26001
26359
  type StartTask = Electron.StartTask;
26002
26360
  type Streams = Electron.Streams;
@@ -26338,6 +26696,7 @@ declare namespace Electron {
26338
26696
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
26339
26697
  type Source = Electron.Source;
26340
26698
  type SourcesOptions = Electron.SourcesOptions;
26699
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
26341
26700
  type StartLoggingOptions = Electron.StartLoggingOptions;
26342
26701
  type StartTask = Electron.StartTask;
26343
26702
  type Streams = Electron.Streams;
@@ -26678,6 +27037,7 @@ declare namespace Electron {
26678
27037
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
26679
27038
  type Source = Electron.Source;
26680
27039
  type SourcesOptions = Electron.SourcesOptions;
27040
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
26681
27041
  type StartLoggingOptions = Electron.StartLoggingOptions;
26682
27042
  type StartTask = Electron.StartTask;
26683
27043
  type Streams = Electron.Streams;
@@ -26853,6 +27213,7 @@ declare namespace Electron {
26853
27213
  type Event<Params extends object = {}> = Electron.Event<Params>;
26854
27214
  const app: App;
26855
27215
  type App = Electron.App;
27216
+ type AppShimHost = Electron.AppShimHost;
26856
27217
  const autoUpdater: AutoUpdater;
26857
27218
  type AutoUpdater = Electron.AutoUpdater;
26858
27219
  class BaseWindow extends Electron.BaseWindow {}
@@ -27114,6 +27475,7 @@ declare namespace Electron {
27114
27475
  type SharedDictionaryInfoOptions = Electron.SharedDictionaryInfoOptions;
27115
27476
  type Source = Electron.Source;
27116
27477
  type SourcesOptions = Electron.SourcesOptions;
27478
+ type StartAppShimServerOptions = Electron.StartAppShimServerOptions;
27117
27479
  type StartLoggingOptions = Electron.StartLoggingOptions;
27118
27480
  type StartTask = Electron.StartTask;
27119
27481
  type Streams = Electron.Streams;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "44.8.0",
3
- "extractedAt": "2026-10-16T03:15:35.553Z"
2
+ "electronVersion": "44.9.1",
3
+ "extractedAt": "2026-10-20T03:15:26.995Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "44.8.0",
3
+ "version": "44.9.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",