electron-types 41.0.0-alpha.6 → 41.0.0-beta.2
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 +3 -3
- package/dist/electron.d.ts +51 -35
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
|
|
|
11
11
|
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
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install -D electron-types@41.0.0-
|
|
14
|
+
npm install -D electron-types@41.0.0-beta.2
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@41.0.0-
|
|
16
|
+
yarn add -D electron-types@41.0.0-beta.2
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@41.0.0-
|
|
18
|
+
pnpm add -D electron-types@41.0.0-beta.2
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 41.0.0-
|
|
1
|
+
// Type definitions for Electron 41.0.0-beta.2
|
|
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
|
|
@@ -1014,7 +1014,7 @@ declare namespace Electron {
|
|
|
1014
1014
|
configureHostResolver(options: ConfigureHostResolverOptions): void;
|
|
1015
1015
|
/**
|
|
1016
1016
|
* By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain
|
|
1017
|
-
* basis if the GPU
|
|
1017
|
+
* basis if the GPU process crashes too frequently. This function disables that
|
|
1018
1018
|
* behavior.
|
|
1019
1019
|
*
|
|
1020
1020
|
* This method can only be called before app is ready.
|
|
@@ -1124,7 +1124,7 @@ declare namespace Electron {
|
|
|
1124
1124
|
*
|
|
1125
1125
|
* Fetches a path's associated icon.
|
|
1126
1126
|
*
|
|
1127
|
-
* On _Windows_, there
|
|
1127
|
+
* On _Windows_, there are 2 kinds of icons:
|
|
1128
1128
|
*
|
|
1129
1129
|
* * Icons associated with certain file extensions, like `.mp3`, `.png`, etc.
|
|
1130
1130
|
* * Icons inside the file itself, like `.exe`, `.dll`, `.ico`.
|
|
@@ -1244,7 +1244,7 @@ declare namespace Electron {
|
|
|
1244
1244
|
* A path to a special directory or file associated with `name`. On failure, an
|
|
1245
1245
|
* `Error` is thrown.
|
|
1246
1246
|
*
|
|
1247
|
-
* If `app.getPath('logs')` is called without
|
|
1247
|
+
* If `app.getPath('logs')` is called without calling `app.setAppLogsPath()` being
|
|
1248
1248
|
* called first, a default log directory will be created equivalent to calling
|
|
1249
1249
|
* `app.setAppLogsPath()` without a `path` parameter.
|
|
1250
1250
|
*/
|
|
@@ -1280,7 +1280,7 @@ declare namespace Electron {
|
|
|
1280
1280
|
* preferred system language has no country code, and that one of the preferred
|
|
1281
1281
|
* system languages corresponds with the language used for the regional format. On
|
|
1282
1282
|
* macOS, the region serves more as a default country code: the user doesn't need
|
|
1283
|
-
* to have Finnish as a preferred language to use Finland as the region,and the
|
|
1283
|
+
* to have Finnish as a preferred language to use Finland as the region, and the
|
|
1284
1284
|
* country code `FI` is used as the country code for preferred system languages
|
|
1285
1285
|
* that do not have associated countries in the language name.
|
|
1286
1286
|
*/
|
|
@@ -2930,7 +2930,7 @@ declare namespace Electron {
|
|
|
2930
2930
|
* hiding titlebar buttons.
|
|
2931
2931
|
*
|
|
2932
2932
|
* This API returns whether the window is in tablet mode, and the `resize` event
|
|
2933
|
-
* can be
|
|
2933
|
+
* can be used to listen to changes to tablet mode.
|
|
2934
2934
|
*
|
|
2935
2935
|
* @platform win32
|
|
2936
2936
|
*/
|
|
@@ -5646,7 +5646,7 @@ declare namespace Electron {
|
|
|
5646
5646
|
* hiding titlebar buttons.
|
|
5647
5647
|
*
|
|
5648
5648
|
* This API returns whether the window is in tablet mode, and the `resize` event
|
|
5649
|
-
* can be
|
|
5649
|
+
* can be used to listen to changes to tablet mode.
|
|
5650
5650
|
*
|
|
5651
5651
|
* @platform win32
|
|
5652
5652
|
*/
|
|
@@ -6700,7 +6700,7 @@ declare namespace Electron {
|
|
|
6700
6700
|
* Cancels an ongoing HTTP transaction. If the request has already emitted the
|
|
6701
6701
|
* `close` event, the abort operation will have no effect. Otherwise an ongoing
|
|
6702
6702
|
* event will emit `abort` and `close` events. Additionally, if there is an ongoing
|
|
6703
|
-
* response object,it will emit the `aborted` event.
|
|
6703
|
+
* response object, it will emit the `aborted` event.
|
|
6704
6704
|
*/
|
|
6705
6705
|
abort(): void;
|
|
6706
6706
|
/**
|
|
@@ -7466,9 +7466,12 @@ declare namespace Electron {
|
|
|
7466
7466
|
* `DesktopCapturerSource` represents a screen or an individual window that can be
|
|
7467
7467
|
* captured.
|
|
7468
7468
|
*
|
|
7469
|
-
* > [!NOTE]
|
|
7470
|
-
*
|
|
7471
|
-
* `
|
|
7469
|
+
* > [!NOTE]
|
|
7470
|
+
*
|
|
7471
|
+
* > * Capturing audio requires `NSAudioCaptureUsageDescription` Info.plist key on
|
|
7472
|
+
* macOS 14.2 Sonoma and higher - read more.
|
|
7473
|
+
* * Capturing the screen contents requires user consent on macOS 10.15 Catalina or
|
|
7474
|
+
* higher, which can detected by `systemPreferences.getMediaAccessStatus`.
|
|
7472
7475
|
*/
|
|
7473
7476
|
getSources(options: SourcesOptions): Promise<Electron.DesktopCapturerSource[]>;
|
|
7474
7477
|
}
|
|
@@ -7557,8 +7560,8 @@ declare namespace Electron {
|
|
|
7557
7560
|
*
|
|
7558
7561
|
* This API can be called safely before the `ready` event the `app` module emits,
|
|
7559
7562
|
* it is usually used to report errors in early stage of startup. If called before
|
|
7560
|
-
* the app `ready`event on Linux, the message will be emitted to stderr, and no
|
|
7561
|
-
* dialog will appear.
|
|
7563
|
+
* the app `ready` event on Linux, the message will be emitted to stderr, and no
|
|
7564
|
+
* GUI dialog will appear.
|
|
7562
7565
|
*/
|
|
7563
7566
|
showErrorBox(title: string, content: string): void;
|
|
7564
7567
|
/**
|
|
@@ -7813,9 +7816,9 @@ declare namespace Electron {
|
|
|
7813
7816
|
*/
|
|
7814
7817
|
displayFrequency: number;
|
|
7815
7818
|
/**
|
|
7816
|
-
* Unique identifier associated with the display. A value of
|
|
7817
|
-
*
|
|
7818
|
-
*
|
|
7819
|
+
* Unique identifier associated with the display. A value of -1 means the display
|
|
7820
|
+
* is invalid or the correct `id` is not yet known, and a value of -10 means the
|
|
7821
|
+
* display is a virtual display assigned to a unified desktop.
|
|
7819
7822
|
*/
|
|
7820
7823
|
id: number;
|
|
7821
7824
|
/**
|
|
@@ -8618,9 +8621,9 @@ declare namespace Electron {
|
|
|
8618
8621
|
removeListener(event: 'end', listener: () => void): this;
|
|
8619
8622
|
/**
|
|
8620
8623
|
* Emitted when an error was encountered while streaming response data events. For
|
|
8621
|
-
* instance, if the server closes the underlying while the response is
|
|
8622
|
-
* streaming, an `error` event will be emitted on the response object and a
|
|
8623
|
-
* event will subsequently follow on the request object.
|
|
8624
|
+
* instance, if the server closes the underlying connection while the response is
|
|
8625
|
+
* still streaming, an `error` event will be emitted on the response object and a
|
|
8626
|
+
* `close` event will subsequently follow on the request object.
|
|
8624
8627
|
*/
|
|
8625
8628
|
on(event: 'error', listener: (
|
|
8626
8629
|
/**
|
|
@@ -9317,7 +9320,7 @@ declare namespace Electron {
|
|
|
9317
9320
|
* opens the associated menu. The indicated character in the button label then gets
|
|
9318
9321
|
* an underline, and the `&` character is not displayed on the button label.
|
|
9319
9322
|
*
|
|
9320
|
-
* In order to escape the `&` character in an item name, add a
|
|
9323
|
+
* In order to escape the `&` character in an item name, add a preceding `&`. For
|
|
9321
9324
|
* example, `&&File` would result in `&File` displayed on the button label.
|
|
9322
9325
|
*
|
|
9323
9326
|
* Passing `null` will suppress the default menu. On Windows and Linux, this has
|
|
@@ -9780,8 +9783,8 @@ declare namespace Electron {
|
|
|
9780
9783
|
*/
|
|
9781
9784
|
readonly inForcedColorsMode: boolean;
|
|
9782
9785
|
/**
|
|
9783
|
-
* A `boolean` that indicates
|
|
9784
|
-
*
|
|
9786
|
+
* A `boolean` that indicates whether the user has chosen via system accessibility
|
|
9787
|
+
* settings to reduce transparency at the OS level.
|
|
9785
9788
|
*
|
|
9786
9789
|
*/
|
|
9787
9790
|
readonly prefersReducedTransparency: boolean;
|
|
@@ -12910,8 +12913,8 @@ declare namespace Electron {
|
|
|
12910
12913
|
/**
|
|
12911
12914
|
* Overrides the `userAgent` and `acceptLanguages` for this session.
|
|
12912
12915
|
*
|
|
12913
|
-
* The `acceptLanguages` must a comma separated ordered list of language codes,
|
|
12914
|
-
* example `"en-US,fr,de,ko,zh-CN,ja"`.
|
|
12916
|
+
* The `acceptLanguages` must be a comma separated ordered list of language codes,
|
|
12917
|
+
* for example `"en-US,fr,de,ko,zh-CN,ja"`.
|
|
12915
12918
|
*
|
|
12916
12919
|
* This doesn't affect existing `WebContents`, and each `WebContents` can use
|
|
12917
12920
|
* `webContents.setUserAgent` to override the session-wide user agent.
|
|
@@ -16262,7 +16265,7 @@ declare namespace Electron {
|
|
|
16262
16265
|
* 302 redirect.
|
|
16263
16266
|
*
|
|
16264
16267
|
* This event cannot be prevented, if you want to prevent redirects you should
|
|
16265
|
-
*
|
|
16268
|
+
* check out the `will-redirect` event above.
|
|
16266
16269
|
*/
|
|
16267
16270
|
on(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
|
|
16268
16271
|
/**
|
|
@@ -17862,7 +17865,8 @@ declare namespace Electron {
|
|
|
17862
17865
|
setDevToolsWebContents(devToolsWebContents: WebContents): void;
|
|
17863
17866
|
/**
|
|
17864
17867
|
* If _offscreen rendering_ is enabled sets the frame rate to the specified number.
|
|
17865
|
-
*
|
|
17868
|
+
* When `webPreferences.offscreen.useSharedTexture` is `false` only values between
|
|
17869
|
+
* 1 and 240 are accepted.
|
|
17866
17870
|
*/
|
|
17867
17871
|
setFrameRate(fps: number): void;
|
|
17868
17872
|
/**
|
|
@@ -17903,10 +17907,10 @@ declare namespace Electron {
|
|
|
17903
17907
|
*/
|
|
17904
17908
|
setWebRTCUDPPortRange(udpPortRange: UdpPortRange): void;
|
|
17905
17909
|
/**
|
|
17906
|
-
* Called before creating a window a new window is requested by the renderer,
|
|
17907
|
-
* by `window.open()`, a link with `target="_blank"`, shift+clicking on a
|
|
17908
|
-
* submitting a form with `<form target="_blank">`. See `window.open()`
|
|
17909
|
-
* details and how to use this in conjunction with `did-create-window`.
|
|
17910
|
+
* Called before creating a window when a new window is requested by the renderer,
|
|
17911
|
+
* e.g. by `window.open()`, a link with `target="_blank"`, shift+clicking on a
|
|
17912
|
+
* link, or submitting a form with `<form target="_blank">`. See `window.open()`
|
|
17913
|
+
* for more details and how to use this in conjunction with `did-create-window`.
|
|
17910
17914
|
*
|
|
17911
17915
|
* An example showing how to customize the process of new `BrowserWindow` creation
|
|
17912
17916
|
* to be `BrowserView` attached to main window instead:
|
|
@@ -17992,7 +17996,7 @@ declare namespace Electron {
|
|
|
17992
17996
|
*/
|
|
17993
17997
|
readonly debugger: Debugger;
|
|
17994
17998
|
/**
|
|
17995
|
-
* A `WebContents | null` property that represents the
|
|
17999
|
+
* A `WebContents | null` property that represents the DevTools `WebContents`
|
|
17996
18000
|
* associated with a given `WebContents`.
|
|
17997
18001
|
*
|
|
17998
18002
|
* > [!NOTE] Users should never store this object because it may become `null` when
|
|
@@ -18768,7 +18772,7 @@ declare namespace Electron {
|
|
|
18768
18772
|
/**
|
|
18769
18773
|
* When `false`, it will disable the same-origin policy (usually using testing
|
|
18770
18774
|
* websites by people), and set `allowRunningInsecureContent` to `true` if this
|
|
18771
|
-
*
|
|
18775
|
+
* option has not been set by user. Default is `true`.
|
|
18772
18776
|
*/
|
|
18773
18777
|
webSecurity?: boolean;
|
|
18774
18778
|
/**
|
|
@@ -20923,6 +20927,18 @@ declare namespace Electron {
|
|
|
20923
20927
|
* @platform darwin
|
|
20924
20928
|
*/
|
|
20925
20929
|
allowLoadingUnsignedLibraries?: boolean;
|
|
20930
|
+
/**
|
|
20931
|
+
* With this flag, the utility process will disclaim responsibility for the child
|
|
20932
|
+
* process. This causes the operating system to consider the child process as a
|
|
20933
|
+
* separate entity for purposes of security policies like Transparency, Consent,
|
|
20934
|
+
* and Control (TCC). When responsibility is disclaimed, the parent process will
|
|
20935
|
+
* not be attributed for any TCC requests initiated by the child process. This is
|
|
20936
|
+
* useful when launching processes that run third-party or otherwise untrusted
|
|
20937
|
+
* code. Default is `false`.
|
|
20938
|
+
*
|
|
20939
|
+
* @platform darwin
|
|
20940
|
+
*/
|
|
20941
|
+
disclaim?: boolean;
|
|
20926
20942
|
/**
|
|
20927
20943
|
* With this flag, all HTTP 401 and 407 network requests created via the net module
|
|
20928
20944
|
* will allow responding to them via the `app#login` event in the main process
|
|
@@ -26082,14 +26098,14 @@ declare namespace NodeJS {
|
|
|
26082
26098
|
/**
|
|
26083
26099
|
* A `boolean` that controls whether or not deprecations printed to `stderr`
|
|
26084
26100
|
* include their stack trace. Setting this to `true` will print stack traces for
|
|
26085
|
-
* deprecations. This property is instead of the `--trace-deprecation` command
|
|
26086
|
-
* flag.
|
|
26101
|
+
* deprecations. This property is used instead of the `--trace-deprecation` command
|
|
26102
|
+
* line flag.
|
|
26087
26103
|
*/
|
|
26088
26104
|
traceDeprecation: boolean;
|
|
26089
26105
|
/**
|
|
26090
26106
|
* A `boolean` that controls whether or not process warnings printed to `stderr`
|
|
26091
26107
|
* include their stack trace. Setting this to `true` will print stack traces for
|
|
26092
|
-
* process warnings (including deprecations). This property is instead of the
|
|
26108
|
+
* process warnings (including deprecations). This property is used instead of the
|
|
26093
26109
|
* `--trace-warnings` command line flag.
|
|
26094
26110
|
*/
|
|
26095
26111
|
traceProcessWarnings: boolean;
|
package/dist/version.json
CHANGED