electron-types 45.0.0-beta.3 → 45.0.0-beta.4
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 +69 -19
- package/dist/version.json +2 -2
- package/package.json +1 -1
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.
|
|
17
|
+
npm install -D electron-types@45.0.0-beta.4
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@45.0.0-beta.
|
|
19
|
+
yarn add -D electron-types@45.0.0-beta.4
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@45.0.0-beta.
|
|
21
|
+
pnpm add -D electron-types@45.0.0-beta.4
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 45.0.0-beta.
|
|
1
|
+
// Type definitions for Electron 45.0.0-beta.4
|
|
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
|
|
@@ -1353,6 +1353,13 @@ declare namespace Electron {
|
|
|
1353
1353
|
* to the npm modules spec. You should usually also specify a `productName` field,
|
|
1354
1354
|
* which is your application's full capitalized name, and which will be preferred
|
|
1355
1355
|
* over `name` by Electron.
|
|
1356
|
+
*
|
|
1357
|
+
* Electron uses the application's name to construct the default `userData`
|
|
1358
|
+
* directory. On Windows, neither `productName` nor `name` should contain the
|
|
1359
|
+
* following special characters, which cannot be used in directory or file names:
|
|
1360
|
+
* `<`, `>`, `:`, `"`, `\`, `/`, `|`, `?`, `*`. Using these characters in the
|
|
1361
|
+
* application's name can prevent Electron from creating the default `userData`
|
|
1362
|
+
* directory and cause the application to crash on startup.
|
|
1356
1363
|
*/
|
|
1357
1364
|
getName(): string;
|
|
1358
1365
|
/**
|
|
@@ -1857,6 +1864,8 @@ declare namespace Electron {
|
|
|
1857
1864
|
/**
|
|
1858
1865
|
* Overrides the current application's name.
|
|
1859
1866
|
*
|
|
1867
|
+
* On Windows, avoid the reserved filename characters in `name`.
|
|
1868
|
+
*
|
|
1860
1869
|
* > [!NOTE] This function overrides the name used internally by Electron; it does
|
|
1861
1870
|
* not affect the name that the OS uses.
|
|
1862
1871
|
*/
|
|
@@ -2044,6 +2053,9 @@ declare namespace Electron {
|
|
|
2044
2053
|
* to the npm modules spec. You should usually also specify a `productName` field,
|
|
2045
2054
|
* which is your application's full capitalized name, and which will be preferred
|
|
2046
2055
|
* over `name` by Electron.
|
|
2056
|
+
*
|
|
2057
|
+
* On Windows, the application's name must not contain reserved filename
|
|
2058
|
+
* characters, because it is used to construct the default `userData` directory.
|
|
2047
2059
|
*/
|
|
2048
2060
|
name: string;
|
|
2049
2061
|
/**
|
|
@@ -7267,7 +7279,10 @@ declare namespace Electron {
|
|
|
7267
7279
|
* soon as they receive the EnableRecording request.
|
|
7268
7280
|
*
|
|
7269
7281
|
* If a recording is already running, the promise will be immediately resolved, as
|
|
7270
|
-
* only one trace operation can be in progress at a time.
|
|
7282
|
+
* only one trace operation can be in progress at a time. If
|
|
7283
|
+
* `options.nativeHeapProfiling` is set while a recording is already running, the
|
|
7284
|
+
* promise is rejected instead, since the already-running recording's options can't
|
|
7285
|
+
* be changed to turn on heap profiling.
|
|
7271
7286
|
*/
|
|
7272
7287
|
startRecording(options: (TraceConfig) | (TraceCategoriesAndOptions)): Promise<void>;
|
|
7273
7288
|
/**
|
|
@@ -7285,6 +7300,12 @@ declare namespace Electron {
|
|
|
7285
7300
|
* Trace data will be written into `resultFilePath`. If `resultFilePath` is empty
|
|
7286
7301
|
* or not provided, trace data will be written to a temporary file, and the path
|
|
7287
7302
|
* will be returned in the promise.
|
|
7303
|
+
*
|
|
7304
|
+
* Trace data is written in the Perfetto protobuf format.
|
|
7305
|
+
*
|
|
7306
|
+
* Heap profiling samples record instruction addresses and module build IDs rather
|
|
7307
|
+
* than function names. To symbolize them, use the symbols published for the
|
|
7308
|
+
* matching Electron release with Chromium's `symbolize_trace` tool.
|
|
7288
7309
|
*/
|
|
7289
7310
|
stopRecording(resultFilePath?: string): Promise<string>;
|
|
7290
7311
|
}
|
|
@@ -10142,6 +10163,25 @@ declare namespace Electron {
|
|
|
10142
10163
|
wheelTicksY?: number;
|
|
10143
10164
|
}
|
|
10144
10165
|
|
|
10166
|
+
interface NativeHeapProfilerOptions {
|
|
10167
|
+
|
|
10168
|
+
// Docs: https://electronjs.org/docs/api/structures/native-heap-profiler-options
|
|
10169
|
+
|
|
10170
|
+
/**
|
|
10171
|
+
* The interval in milliseconds at which samples are written to the trace. Each
|
|
10172
|
+
* write is a full snapshot of every sampled allocation that is still live, so
|
|
10173
|
+
* short intervals can fill the trace buffer quickly in long recordings. Defaults
|
|
10174
|
+
* to `0`, which writes a single snapshot when tracing stops.
|
|
10175
|
+
*/
|
|
10176
|
+
dumpInterval?: number;
|
|
10177
|
+
/**
|
|
10178
|
+
* The average number of bytes allocated between samples. Lower values give a more
|
|
10179
|
+
* precise profile at a higher performance cost. Must be greater than `0`. Defaults
|
|
10180
|
+
* to Chromium's default, currently `131072` (128 KiB).
|
|
10181
|
+
*/
|
|
10182
|
+
samplingInterval?: number;
|
|
10183
|
+
}
|
|
10184
|
+
|
|
10145
10185
|
class NativeImage {
|
|
10146
10186
|
|
|
10147
10187
|
// Docs: https://electronjs.org/docs/api/native-image
|
|
@@ -10612,9 +10652,6 @@ declare namespace Electron {
|
|
|
10612
10652
|
|
|
10613
10653
|
// Docs: https://electronjs.org/docs/api/notification
|
|
10614
10654
|
|
|
10615
|
-
/**
|
|
10616
|
-
* @platform darwin,win32
|
|
10617
|
-
*/
|
|
10618
10655
|
on(event: 'action', listener: (details: Event<NotificationActionEventParams>,
|
|
10619
10656
|
/**
|
|
10620
10657
|
* @deprecated
|
|
@@ -10625,9 +10662,6 @@ declare namespace Electron {
|
|
|
10625
10662
|
* @platform win32
|
|
10626
10663
|
*/
|
|
10627
10664
|
selectionIndex: number) => void): this;
|
|
10628
|
-
/**
|
|
10629
|
-
* @platform darwin,win32
|
|
10630
|
-
*/
|
|
10631
10665
|
off(event: 'action', listener: (details: Event<NotificationActionEventParams>,
|
|
10632
10666
|
/**
|
|
10633
10667
|
* @deprecated
|
|
@@ -10638,9 +10672,6 @@ declare namespace Electron {
|
|
|
10638
10672
|
* @platform win32
|
|
10639
10673
|
*/
|
|
10640
10674
|
selectionIndex: number) => void): this;
|
|
10641
|
-
/**
|
|
10642
|
-
* @platform darwin,win32
|
|
10643
|
-
*/
|
|
10644
10675
|
once(event: 'action', listener: (details: Event<NotificationActionEventParams>,
|
|
10645
10676
|
/**
|
|
10646
10677
|
* @deprecated
|
|
@@ -10651,9 +10682,6 @@ declare namespace Electron {
|
|
|
10651
10682
|
* @platform win32
|
|
10652
10683
|
*/
|
|
10653
10684
|
selectionIndex: number) => void): this;
|
|
10654
|
-
/**
|
|
10655
|
-
* @platform darwin,win32
|
|
10656
|
-
*/
|
|
10657
10685
|
addListener(event: 'action', listener: (details: Event<NotificationActionEventParams>,
|
|
10658
10686
|
/**
|
|
10659
10687
|
* @deprecated
|
|
@@ -10664,9 +10692,6 @@ declare namespace Electron {
|
|
|
10664
10692
|
* @platform win32
|
|
10665
10693
|
*/
|
|
10666
10694
|
selectionIndex: number) => void): this;
|
|
10667
|
-
/**
|
|
10668
|
-
* @platform darwin,win32
|
|
10669
|
-
*/
|
|
10670
10695
|
removeListener(event: 'action', listener: (details: Event<NotificationActionEventParams>,
|
|
10671
10696
|
/**
|
|
10672
10697
|
* @deprecated
|
|
@@ -15197,6 +15222,17 @@ declare namespace Electron {
|
|
|
15197
15222
|
* `-excluded_category1,-excluded_category2`.
|
|
15198
15223
|
*/
|
|
15199
15224
|
categoryFilter: string;
|
|
15225
|
+
/**
|
|
15226
|
+
* **Electron extension; not part of Chromium's TraceCategoriesAndOptions schema.**
|
|
15227
|
+
* Enables native (C/C++) heap allocation profiling for this recording. This is
|
|
15228
|
+
* distinct from JavaScript heap profiling (see `contents.takeHeapSnapshot()`); it
|
|
15229
|
+
* samples allocations made by Chromium and native modules. Unlike `TraceConfig`,
|
|
15230
|
+
* this object has no `included_process_ids` field, so every traced process is
|
|
15231
|
+
* profiled.
|
|
15232
|
+
*
|
|
15233
|
+
* @experimental
|
|
15234
|
+
*/
|
|
15235
|
+
nativeHeapProfiling?: NativeHeapProfilerOptions;
|
|
15200
15236
|
/**
|
|
15201
15237
|
* Controls what kind of tracing is enabled, it is a comma-delimited sequence of
|
|
15202
15238
|
* the following strings: `record-until-full`, `record-continuously`,
|
|
@@ -15249,6 +15285,17 @@ declare namespace Electron {
|
|
|
15249
15285
|
* memory-infra docs for more information.
|
|
15250
15286
|
*/
|
|
15251
15287
|
memory_dump_config?: Record<string, any>;
|
|
15288
|
+
/**
|
|
15289
|
+
* **Electron extension; not part of Chromium's TraceConfig schema.** Enables
|
|
15290
|
+
* native (C/C++) heap allocation profiling for this recording. This is distinct
|
|
15291
|
+
* from JavaScript heap profiling (see `process.takeHeapSnapshot()` or
|
|
15292
|
+
* `contents.takeHeapSnapshot()`); it samples allocations made by Chromium and
|
|
15293
|
+
* native modules. `included_process_ids` above also limits which processes are
|
|
15294
|
+
* profiled when this is enabled.
|
|
15295
|
+
*
|
|
15296
|
+
* @experimental
|
|
15297
|
+
*/
|
|
15298
|
+
nativeHeapProfiling?: NativeHeapProfilerOptions;
|
|
15252
15299
|
/**
|
|
15253
15300
|
* Can be `record-until-full`, `record-continuously`, `record-as-much-as-possible`
|
|
15254
15301
|
* or `trace-to-console`. Defaults to `record-until-full`.
|
|
@@ -23321,8 +23368,6 @@ declare namespace Electron {
|
|
|
23321
23368
|
/**
|
|
23322
23369
|
* Actions to add to the notification. Please read the available actions and
|
|
23323
23370
|
* limitations in the `NotificationAction` documentation.
|
|
23324
|
-
*
|
|
23325
|
-
* @platform darwin,win32
|
|
23326
23371
|
*/
|
|
23327
23372
|
actions?: NotificationAction[];
|
|
23328
23373
|
/**
|
|
@@ -26060,6 +26105,7 @@ declare namespace Electron {
|
|
|
26060
26105
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
26061
26106
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
26062
26107
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
26108
|
+
type NativeHeapProfilerOptions = Electron.NativeHeapProfilerOptions;
|
|
26063
26109
|
type NavigationEntry = Electron.NavigationEntry;
|
|
26064
26110
|
type NotificationAction = Electron.NotificationAction;
|
|
26065
26111
|
type NotificationResponse = Electron.NotificationResponse;
|
|
@@ -26488,6 +26534,7 @@ declare namespace Electron {
|
|
|
26488
26534
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
26489
26535
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
26490
26536
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
26537
|
+
type NativeHeapProfilerOptions = Electron.NativeHeapProfilerOptions;
|
|
26491
26538
|
type NavigationEntry = Electron.NavigationEntry;
|
|
26492
26539
|
type NotificationAction = Electron.NotificationAction;
|
|
26493
26540
|
type NotificationResponse = Electron.NotificationResponse;
|
|
@@ -26840,6 +26887,7 @@ declare namespace Electron {
|
|
|
26840
26887
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
26841
26888
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
26842
26889
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
26890
|
+
type NativeHeapProfilerOptions = Electron.NativeHeapProfilerOptions;
|
|
26843
26891
|
type NavigationEntry = Electron.NavigationEntry;
|
|
26844
26892
|
type NotificationAction = Electron.NotificationAction;
|
|
26845
26893
|
type NotificationResponse = Electron.NotificationResponse;
|
|
@@ -27194,6 +27242,7 @@ declare namespace Electron {
|
|
|
27194
27242
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
27195
27243
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
27196
27244
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
27245
|
+
type NativeHeapProfilerOptions = Electron.NativeHeapProfilerOptions;
|
|
27197
27246
|
type NavigationEntry = Electron.NavigationEntry;
|
|
27198
27247
|
type NotificationAction = Electron.NotificationAction;
|
|
27199
27248
|
type NotificationResponse = Electron.NotificationResponse;
|
|
@@ -27644,6 +27693,7 @@ declare namespace Electron {
|
|
|
27644
27693
|
type MimeTypedBuffer = Electron.MimeTypedBuffer;
|
|
27645
27694
|
type MouseInputEvent = Electron.MouseInputEvent;
|
|
27646
27695
|
type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
|
|
27696
|
+
type NativeHeapProfilerOptions = Electron.NativeHeapProfilerOptions;
|
|
27647
27697
|
type NavigationEntry = Electron.NavigationEntry;
|
|
27648
27698
|
type NotificationAction = Electron.NotificationAction;
|
|
27649
27699
|
type NotificationResponse = Electron.NotificationResponse;
|
package/dist/version.json
CHANGED