electron-types 42.0.0-beta.6 → 42.0.0-beta.7
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 +98 -2
- 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@42.0.0-beta.
|
|
14
|
+
npm install -D electron-types@42.0.0-beta.7
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@42.0.0-beta.
|
|
16
|
+
yarn add -D electron-types@42.0.0-beta.7
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@42.0.0-beta.
|
|
18
|
+
pnpm add -D electron-types@42.0.0-beta.7
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 42.0.0-beta.
|
|
1
|
+
// Type definitions for Electron 42.0.0-beta.7
|
|
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
|
|
@@ -7046,6 +7046,34 @@ declare namespace Electron {
|
|
|
7046
7046
|
|
|
7047
7047
|
// Docs: https://electronjs.org/docs/api/content-tracing
|
|
7048
7048
|
|
|
7049
|
+
/**
|
|
7050
|
+
* Resolves once heap profiling has been enabled.
|
|
7051
|
+
*
|
|
7052
|
+
* Enable heap profiling for MemoryInfra traces. Equivalent to the `--memlog`
|
|
7053
|
+
* switch in Chrome.
|
|
7054
|
+
*
|
|
7055
|
+
* Only takes effect if the `disabled-by-default-memory-infra` category is
|
|
7056
|
+
* included.
|
|
7057
|
+
*
|
|
7058
|
+
* Needs to be called before `contentTracing.startRecording()`.
|
|
7059
|
+
*
|
|
7060
|
+
* Usage:
|
|
7061
|
+
*
|
|
7062
|
+
* To view the recorded heap dumps:
|
|
7063
|
+
*
|
|
7064
|
+
* * Download the breakpad symbols for your Electron version from the Electron
|
|
7065
|
+
* GitHub releases
|
|
7066
|
+
* * Clone the Electron source code
|
|
7067
|
+
* * In your Chromium checkout for Electron, run this command to symbolicate the
|
|
7068
|
+
* heap dump:
|
|
7069
|
+
* * Open the symbolicated trace in `chrome://tracing` (the Perfetto UI does not
|
|
7070
|
+
* support memory dumps yet)
|
|
7071
|
+
* * Click on one of the `M` symbols
|
|
7072
|
+
* * Click on a `☰` triple bar icon (e.g., in the `malloc` column)
|
|
7073
|
+
*
|
|
7074
|
+
* @experimental
|
|
7075
|
+
*/
|
|
7076
|
+
enableHeapProfiling(options?: EnableHeapProfilingOptions): Promise<void>;
|
|
7049
7077
|
/**
|
|
7050
7078
|
* resolves with an array of category groups once all child processes have
|
|
7051
7079
|
* acknowledged the `getCategories` request
|
|
@@ -8226,6 +8254,32 @@ declare namespace Electron {
|
|
|
8226
8254
|
savePath: string;
|
|
8227
8255
|
}
|
|
8228
8256
|
|
|
8257
|
+
interface EnableHeapProfilingOptions {
|
|
8258
|
+
|
|
8259
|
+
// Docs: https://electronjs.org/docs/api/structures/enable-heap-profiling-options
|
|
8260
|
+
|
|
8261
|
+
/**
|
|
8262
|
+
* Controls which processes are profiled. Equivalent to `--memlog` in Chrome.
|
|
8263
|
+
* Default is `all`.
|
|
8264
|
+
*/
|
|
8265
|
+
mode?: ('all' | 'browser' | 'gpu' | 'minimal' | 'renderer-sampling' | 'all-renderers' | 'utility-sampling' | 'all-utilities' | 'utility-and-browser');
|
|
8266
|
+
/**
|
|
8267
|
+
* Controls the sampling interval in bytes. The lower the interval, the more
|
|
8268
|
+
* precise the profile is. However it comes at the cost of performance. Default is
|
|
8269
|
+
* `100000` (100KB). That is enough to observe allocation sites that make
|
|
8270
|
+
* allocations >500KB total, where total equals to a single allocation size times
|
|
8271
|
+
* the number of such allocations at the same call site. Equivalent to
|
|
8272
|
+
* `--memlog-sampling-rate` in Chrome. Must be an integer between `1000` and
|
|
8273
|
+
* `10000000`.
|
|
8274
|
+
*/
|
|
8275
|
+
samplingRate?: number;
|
|
8276
|
+
/**
|
|
8277
|
+
* Controls the type of metadata recorded for each allocation. Equivalent to
|
|
8278
|
+
* `--memlog-stack-mode` in Chrome. Default is `native`.
|
|
8279
|
+
*/
|
|
8280
|
+
stackMode?: ('native' | 'native-with-thread-names');
|
|
8281
|
+
}
|
|
8282
|
+
|
|
8229
8283
|
interface Extension {
|
|
8230
8284
|
|
|
8231
8285
|
// Docs: https://electronjs.org/docs/api/structures/extension
|
|
@@ -10341,6 +10395,35 @@ declare namespace Electron {
|
|
|
10341
10395
|
* Notification
|
|
10342
10396
|
*/
|
|
10343
10397
|
constructor(options?: NotificationConstructorOptions);
|
|
10398
|
+
/**
|
|
10399
|
+
* Resolves with an array of `Notification` objects representing all delivered
|
|
10400
|
+
* notifications still present in Notification Center.
|
|
10401
|
+
*
|
|
10402
|
+
* Each returned `Notification` is a live object connected to the corresponding
|
|
10403
|
+
* delivered notification. Interaction events (`click`, `reply`, `action`, `close`)
|
|
10404
|
+
* will fire on these objects when the user interacts with the notification in
|
|
10405
|
+
* Notification Center. This is useful after an app restart to re-attach event
|
|
10406
|
+
* handlers to notifications from a previous session.
|
|
10407
|
+
*
|
|
10408
|
+
* The returned notifications have their `id`, `groupId`, `title`, `subtitle`, and
|
|
10409
|
+
* `body` properties populated from information available in the Notification
|
|
10410
|
+
* Center. Other properties (e.g., `actions`, `silent`, `icon`) are not available
|
|
10411
|
+
* from delivered notifications and will have default values.
|
|
10412
|
+
*
|
|
10413
|
+
* > [!NOTE] Like all macOS notification APIs, this method requires the application
|
|
10414
|
+
* to be code-signed. In unsigned development builds, notifications are not
|
|
10415
|
+
* delivered to Notification Center and this method will resolve with an empty
|
|
10416
|
+
* array.
|
|
10417
|
+
*
|
|
10418
|
+
* > [!NOTE] Unlike notifications created with `new Notification()`, notifications
|
|
10419
|
+
* returned by `getHistory()` will remain visible in Notification Center when the
|
|
10420
|
+
* object is garbage collected. Calling `show()` on a restored notification will
|
|
10421
|
+
* remove the original from Notification Center and post a new one with the same
|
|
10422
|
+
* properties.
|
|
10423
|
+
*
|
|
10424
|
+
* @platform darwin
|
|
10425
|
+
*/
|
|
10426
|
+
static getHistory(): Promise<Electron.Notification[]>;
|
|
10344
10427
|
/**
|
|
10345
10428
|
* Registers a callback to handle all notification activations. The callback is
|
|
10346
10429
|
* invoked whenever a notification is clicked, replied to, or has an action button
|
|
@@ -10390,6 +10473,10 @@ declare namespace Electron {
|
|
|
10390
10473
|
*
|
|
10391
10474
|
* If the notification has been shown before, this method will dismiss the
|
|
10392
10475
|
* previously shown notification and create a new one with identical properties.
|
|
10476
|
+
*
|
|
10477
|
+
* On macOS, calling `show()` on a notification returned by
|
|
10478
|
+
* `Notification.getHistory()` will remove the original notification from
|
|
10479
|
+
* Notification Center and post a new one with the same properties.
|
|
10393
10480
|
*/
|
|
10394
10481
|
show(): void;
|
|
10395
10482
|
/**
|
|
@@ -13409,7 +13496,7 @@ declare namespace Electron {
|
|
|
13409
13496
|
/**
|
|
13410
13497
|
* The pixel format of the texture.
|
|
13411
13498
|
*/
|
|
13412
|
-
pixelFormat: ('bgra' | 'rgba' | 'rgbaf16' | 'nv12' | 'p010le');
|
|
13499
|
+
pixelFormat: ('bgra' | 'rgba' | 'rgbaf16' | 'nv12' | 'nv16' | 'p010le');
|
|
13413
13500
|
/**
|
|
13414
13501
|
* A timestamp in microseconds that will be reflected to `VideoFrame`.
|
|
13415
13502
|
*/
|
|
@@ -20896,6 +20983,8 @@ declare namespace Electron {
|
|
|
20896
20983
|
postBody?: PostBody;
|
|
20897
20984
|
/**
|
|
20898
20985
|
* Can be `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
|
|
20986
|
+
* Corresponds to the manner an associated link was clicked. See Chromium's
|
|
20987
|
+
* WindowOpenDisposition.
|
|
20899
20988
|
*/
|
|
20900
20989
|
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other');
|
|
20901
20990
|
}
|
|
@@ -21227,6 +21316,8 @@ declare namespace Electron {
|
|
|
21227
21316
|
features: string;
|
|
21228
21317
|
/**
|
|
21229
21318
|
* Can be `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
|
|
21319
|
+
* Corresponds to the manner an associated link was clicked. See Chromium's
|
|
21320
|
+
* WindowOpenDisposition.
|
|
21230
21321
|
*/
|
|
21231
21322
|
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other');
|
|
21232
21323
|
/**
|
|
@@ -24615,6 +24706,7 @@ declare namespace Electron {
|
|
|
24615
24706
|
type CustomScheme = Electron.CustomScheme;
|
|
24616
24707
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
24617
24708
|
type Display = Electron.Display;
|
|
24709
|
+
type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
|
|
24618
24710
|
type Extension = Electron.Extension;
|
|
24619
24711
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
24620
24712
|
type FileFilter = Electron.FileFilter;
|
|
@@ -25016,6 +25108,7 @@ declare namespace Electron {
|
|
|
25016
25108
|
type CustomScheme = Electron.CustomScheme;
|
|
25017
25109
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
25018
25110
|
type Display = Electron.Display;
|
|
25111
|
+
type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
|
|
25019
25112
|
type Extension = Electron.Extension;
|
|
25020
25113
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
25021
25114
|
type FileFilter = Electron.FileFilter;
|
|
@@ -25345,6 +25438,7 @@ declare namespace Electron {
|
|
|
25345
25438
|
type CustomScheme = Electron.CustomScheme;
|
|
25346
25439
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
25347
25440
|
type Display = Electron.Display;
|
|
25441
|
+
type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
|
|
25348
25442
|
type Extension = Electron.Extension;
|
|
25349
25443
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
25350
25444
|
type FileFilter = Electron.FileFilter;
|
|
@@ -25673,6 +25767,7 @@ declare namespace Electron {
|
|
|
25673
25767
|
type CustomScheme = Electron.CustomScheme;
|
|
25674
25768
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
25675
25769
|
type Display = Electron.Display;
|
|
25770
|
+
type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
|
|
25676
25771
|
type Extension = Electron.Extension;
|
|
25677
25772
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
25678
25773
|
type FileFilter = Electron.FileFilter;
|
|
@@ -26095,6 +26190,7 @@ declare namespace Electron {
|
|
|
26095
26190
|
type CustomScheme = Electron.CustomScheme;
|
|
26096
26191
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
26097
26192
|
type Display = Electron.Display;
|
|
26193
|
+
type EnableHeapProfilingOptions = Electron.EnableHeapProfilingOptions;
|
|
26098
26194
|
type Extension = Electron.Extension;
|
|
26099
26195
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
26100
26196
|
type FileFilter = Electron.FileFilter;
|
package/dist/version.json
CHANGED