@types/node 8.10.32 → 8.10.36

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.
node v8/inspector.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- // tslint:disable-next-line:dt-header
2
1
  // Type definitions for inspector
3
2
 
4
3
  // These definitions are auto-generated.
@@ -8,2098 +7,1781 @@
8
7
  /**
9
8
  * The inspector module provides an API for interacting with the V8 inspector.
10
9
  */
11
- // tslint:disable-next-line:no-single-declare-module
12
10
  declare module "inspector" {
13
11
  import { EventEmitter } from 'events';
14
12
 
15
- interface InspectorNotification<T> {
13
+ export interface InspectorNotification<T> {
16
14
  method: string;
17
15
  params: T;
18
16
  }
19
17
 
20
- namespace Console {
18
+ export namespace Schema {
21
19
  /**
22
- * Console message.
20
+ * Description of the protocol domain.
23
21
  */
24
- interface ConsoleMessage {
25
- /**
26
- * Message source.
27
- */
28
- source: string;
29
- /**
30
- * Message severity.
31
- */
32
- level: string;
33
- /**
34
- * Message text.
35
- */
36
- text: string;
37
- /**
38
- * URL of the message origin.
39
- */
40
- url?: string;
22
+ export interface Domain {
41
23
  /**
42
- * Line number in the resource that generated this message (1-based).
24
+ * Domain name.
43
25
  */
44
- line?: number;
26
+ name: string;
45
27
  /**
46
- * Column number in the resource that generated this message (1-based).
28
+ * Domain version.
47
29
  */
48
- column?: number;
30
+ version: string;
49
31
  }
50
32
 
51
- interface MessageAddedEventDataType {
33
+ export interface GetDomainsReturnType {
52
34
  /**
53
- * Console message that has been added.
35
+ * List of supported domains.
54
36
  */
55
- message: ConsoleMessage;
37
+ domains: Schema.Domain[];
56
38
  }
57
39
  }
58
40
 
59
- namespace Debugger {
60
- /**
61
- * Breakpoint identifier.
62
- */
63
- type BreakpointId = string;
64
-
41
+ export namespace Runtime {
65
42
  /**
66
- * Call frame identifier.
43
+ * Unique script identifier.
67
44
  */
68
- type CallFrameId = string;
45
+ export type ScriptId = string;
69
46
 
70
47
  /**
71
- * Location in the source code.
48
+ * Unique object identifier.
72
49
  */
73
- interface Location {
74
- /**
75
- * Script identifier as reported in the `Debugger.scriptParsed`.
76
- */
77
- scriptId: Runtime.ScriptId;
78
- /**
79
- * Line number in the script (0-based).
80
- */
81
- lineNumber: number;
82
- /**
83
- * Column number in the script (0-based).
84
- */
85
- columnNumber?: number;
86
- }
50
+ export type RemoteObjectId = string;
87
51
 
88
52
  /**
89
- * Location in the source code.
90
- * @experimental
53
+ * Primitive value which cannot be JSON-stringified.
91
54
  */
92
- interface ScriptPosition {
93
- lineNumber: number;
94
- columnNumber: number;
95
- }
55
+ export type UnserializableValue = string;
96
56
 
97
57
  /**
98
- * JavaScript call frame. Array of call frames form the call stack.
58
+ * Mirror object referencing original JavaScript object.
99
59
  */
100
- interface CallFrame {
60
+ export interface RemoteObject {
101
61
  /**
102
- * Call frame identifier. This identifier is only valid while the virtual machine is paused.
62
+ * Object type.
103
63
  */
104
- callFrameId: CallFrameId;
64
+ type: string;
105
65
  /**
106
- * Name of the JavaScript function called on this call frame.
66
+ * Object subtype hint. Specified for <code>object</code> type values only.
107
67
  */
108
- functionName: string;
68
+ subtype?: string;
109
69
  /**
110
- * Location in the source code.
70
+ * Object class (constructor) name. Specified for <code>object</code> type values only.
111
71
  */
112
- functionLocation?: Location;
72
+ className?: string;
113
73
  /**
114
- * Location in the source code.
74
+ * Remote object value in case of primitive values or JSON values (if it was requested).
115
75
  */
116
- location: Location;
76
+ value?: any;
117
77
  /**
118
- * JavaScript script name or url.
78
+ * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
119
79
  */
120
- url: string;
80
+ unserializableValue?: Runtime.UnserializableValue;
121
81
  /**
122
- * Scope chain for this call frame.
82
+ * String representation of the object.
83
+ */
84
+ description?: string;
85
+ /**
86
+ * Unique object identifier (for non-primitive values).
123
87
  */
124
- scopeChain: Scope[];
88
+ objectId?: Runtime.RemoteObjectId;
125
89
  /**
126
- * `this` object for this call frame.
90
+ * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
91
+ * @experimental
127
92
  */
128
- this: Runtime.RemoteObject;
93
+ preview?: Runtime.ObjectPreview;
129
94
  /**
130
- * The value being returned, if the function is at return point.
95
+ * @experimental
131
96
  */
132
- returnValue?: Runtime.RemoteObject;
97
+ customPreview?: Runtime.CustomPreview;
133
98
  }
134
99
 
135
100
  /**
136
- * Scope description.
101
+ * @experimental
102
+ */
103
+ export interface CustomPreview {
104
+ header: string;
105
+ hasBody: boolean;
106
+ formatterObjectId: Runtime.RemoteObjectId;
107
+ bindRemoteObjectFunctionId: Runtime.RemoteObjectId;
108
+ configObjectId?: Runtime.RemoteObjectId;
109
+ }
110
+
111
+ /**
112
+ * Object containing abbreviated remote object value.
113
+ * @experimental
137
114
  */
138
- interface Scope {
115
+ export interface ObjectPreview {
139
116
  /**
140
- * Scope type.
117
+ * Object type.
141
118
  */
142
119
  type: string;
143
120
  /**
144
- * Object representing the scope. For `global` and `with` scopes it represents the actual
145
- * object; for the rest of the scopes, it is artificial transient object enumerating scope
146
- * variables as its properties.
121
+ * Object subtype hint. Specified for <code>object</code> type values only.
147
122
  */
148
- object: Runtime.RemoteObject;
149
- name?: string;
123
+ subtype?: string;
150
124
  /**
151
- * Location in the source code where scope starts
125
+ * String representation of the object.
152
126
  */
153
- startLocation?: Location;
127
+ description?: string;
154
128
  /**
155
- * Location in the source code where scope ends
129
+ * True iff some of the properties or entries of the original object did not fit.
130
+ */
131
+ overflow: boolean;
132
+ /**
133
+ * List of the properties.
134
+ */
135
+ properties: Runtime.PropertyPreview[];
136
+ /**
137
+ * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
156
138
  */
157
- endLocation?: Location;
139
+ entries?: Runtime.EntryPreview[];
158
140
  }
159
141
 
160
142
  /**
161
- * Search match for resource.
143
+ * @experimental
162
144
  */
163
- interface SearchMatch {
145
+ export interface PropertyPreview {
164
146
  /**
165
- * Line number in resource content.
147
+ * Property name.
166
148
  */
167
- lineNumber: number;
149
+ name: string;
168
150
  /**
169
- * Line with match content.
151
+ * Object type. Accessor means that the property itself is an accessor property.
170
152
  */
171
- lineContent: string;
172
- }
173
-
174
- interface BreakLocation {
153
+ type: string;
175
154
  /**
176
- * Script identifier as reported in the `Debugger.scriptParsed`.
155
+ * User-friendly property value string.
177
156
  */
178
- scriptId: Runtime.ScriptId;
157
+ value?: string;
179
158
  /**
180
- * Line number in the script (0-based).
159
+ * Nested value preview.
181
160
  */
182
- lineNumber: number;
161
+ valuePreview?: Runtime.ObjectPreview;
183
162
  /**
184
- * Column number in the script (0-based).
163
+ * Object subtype hint. Specified for <code>object</code> type values only.
185
164
  */
186
- columnNumber?: number;
187
- type?: string;
165
+ subtype?: string;
188
166
  }
189
167
 
190
- interface ContinueToLocationParameterType {
168
+ /**
169
+ * @experimental
170
+ */
171
+ export interface EntryPreview {
191
172
  /**
192
- * Location to continue to.
173
+ * Preview of the key. Specified for map-like collection entries.
193
174
  */
194
- location: Location;
195
- targetCallFrames?: string;
175
+ key?: Runtime.ObjectPreview;
176
+ /**
177
+ * Preview of the value.
178
+ */
179
+ value: Runtime.ObjectPreview;
196
180
  }
197
181
 
198
- interface EvaluateOnCallFrameParameterType {
182
+ /**
183
+ * Object property descriptor.
184
+ */
185
+ export interface PropertyDescriptor {
199
186
  /**
200
- * Call frame identifier to evaluate on.
187
+ * Property name or symbol description.
201
188
  */
202
- callFrameId: CallFrameId;
189
+ name: string;
203
190
  /**
204
- * Expression to evaluate.
191
+ * The value associated with the property.
205
192
  */
206
- expression: string;
193
+ value?: Runtime.RemoteObject;
207
194
  /**
208
- * String object group name to put result into (allows rapid releasing resulting object handles
209
- * using `releaseObjectGroup`).
195
+ * True if the value associated with the property may be changed (data descriptors only).
210
196
  */
211
- objectGroup?: string;
197
+ writable?: boolean;
212
198
  /**
213
- * Specifies whether command line API should be available to the evaluated expression, defaults
214
- * to false.
199
+ * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
215
200
  */
216
- includeCommandLineAPI?: boolean;
201
+ get?: Runtime.RemoteObject;
217
202
  /**
218
- * In silent mode exceptions thrown during evaluation are not reported and do not pause
219
- * execution. Overrides `setPauseOnException` state.
203
+ * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
220
204
  */
221
- silent?: boolean;
205
+ set?: Runtime.RemoteObject;
222
206
  /**
223
- * Whether the result is expected to be a JSON object that should be sent by value.
207
+ * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
224
208
  */
225
- returnByValue?: boolean;
209
+ configurable: boolean;
226
210
  /**
227
- * Whether preview should be generated for the result.
228
- * @experimental
211
+ * True if this property shows up during enumeration of the properties on the corresponding object.
229
212
  */
230
- generatePreview?: boolean;
213
+ enumerable: boolean;
231
214
  /**
232
- * Whether to throw an exception if side effect cannot be ruled out during evaluation.
215
+ * True if the result was thrown during the evaluation.
233
216
  */
234
- throwOnSideEffect?: boolean;
217
+ wasThrown?: boolean;
235
218
  /**
236
- * Terminate execution after timing out (number of milliseconds).
237
- * @experimental
219
+ * True if the property is owned for the object.
238
220
  */
239
- timeout?: Runtime.TimeDelta;
240
- }
241
-
242
- interface GetPossibleBreakpointsParameterType {
221
+ isOwn?: boolean;
243
222
  /**
244
- * Start of range to search possible breakpoint locations in.
223
+ * Property symbol object, if the property is of the <code>symbol</code> type.
245
224
  */
246
- start: Location;
225
+ symbol?: Runtime.RemoteObject;
226
+ }
227
+
228
+ /**
229
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
230
+ */
231
+ export interface InternalPropertyDescriptor {
247
232
  /**
248
- * End of range to search possible breakpoint locations in (excluding). When not specified, end
249
- * of scripts is used as end of range.
233
+ * Conventional property name.
250
234
  */
251
- end?: Location;
235
+ name: string;
252
236
  /**
253
- * Only consider locations which are in the same (non-nested) function as start.
237
+ * The value associated with the property.
254
238
  */
255
- restrictToFunction?: boolean;
239
+ value?: Runtime.RemoteObject;
256
240
  }
257
241
 
258
- interface GetScriptSourceParameterType {
242
+ /**
243
+ * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
244
+ */
245
+ export interface CallArgument {
259
246
  /**
260
- * Id of the script to get source for.
247
+ * Primitive value or serializable javascript object.
261
248
  */
262
- scriptId: Runtime.ScriptId;
263
- }
264
-
265
- interface GetStackTraceParameterType {
266
- stackTraceId: Runtime.StackTraceId;
267
- }
268
-
269
- interface PauseOnAsyncCallParameterType {
249
+ value?: any;
270
250
  /**
271
- * Debugger will pause when async call with given stack trace is started.
251
+ * Primitive value which can not be JSON-stringified.
272
252
  */
273
- parentStackTraceId: Runtime.StackTraceId;
274
- }
275
-
276
- interface RemoveBreakpointParameterType {
277
- breakpointId: BreakpointId;
278
- }
279
-
280
- interface RestartFrameParameterType {
253
+ unserializableValue?: Runtime.UnserializableValue;
281
254
  /**
282
- * Call frame identifier to evaluate on.
255
+ * Remote object handle.
283
256
  */
284
- callFrameId: CallFrameId;
257
+ objectId?: Runtime.RemoteObjectId;
285
258
  }
286
259
 
287
- interface SearchInContentParameterType {
288
- /**
289
- * Id of the script to search in.
290
- */
291
- scriptId: Runtime.ScriptId;
260
+ /**
261
+ * Id of an execution context.
262
+ */
263
+ export type ExecutionContextId = number;
264
+
265
+ /**
266
+ * Description of an isolated world.
267
+ */
268
+ export interface ExecutionContextDescription {
292
269
  /**
293
- * String to search for.
270
+ * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
294
271
  */
295
- query: string;
272
+ id: Runtime.ExecutionContextId;
296
273
  /**
297
- * If true, search is case sensitive.
274
+ * Execution context origin.
298
275
  */
299
- caseSensitive?: boolean;
276
+ origin: string;
300
277
  /**
301
- * If true, treats string parameter as regex.
278
+ * Human readable name describing given context.
302
279
  */
303
- isRegex?: boolean;
304
- }
305
-
306
- interface SetAsyncCallStackDepthParameterType {
280
+ name: string;
307
281
  /**
308
- * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
309
- * call stacks (default).
282
+ * Embedder-specific auxiliary data.
310
283
  */
311
- maxDepth: number;
284
+ auxData?: {};
312
285
  }
313
286
 
314
- interface SetBlackboxPatternsParameterType {
287
+ /**
288
+ * Detailed information about exception (or error) that was thrown during script compilation or execution.
289
+ */
290
+ export interface ExceptionDetails {
315
291
  /**
316
- * Array of regexps that will be used to check script url for blackbox state.
292
+ * Exception id.
317
293
  */
318
- patterns: string[];
319
- }
320
-
321
- interface SetBlackboxedRangesParameterType {
294
+ exceptionId: number;
322
295
  /**
323
- * Id of the script.
296
+ * Exception text, which should be used together with exception object when available.
324
297
  */
325
- scriptId: Runtime.ScriptId;
326
- positions: ScriptPosition[];
327
- }
328
-
329
- interface SetBreakpointParameterType {
298
+ text: string;
330
299
  /**
331
- * Location to set breakpoint in.
300
+ * Line number of the exception location (0-based).
332
301
  */
333
- location: Location;
302
+ lineNumber: number;
334
303
  /**
335
- * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
336
- * breakpoint if this expression evaluates to true.
304
+ * Column number of the exception location (0-based).
337
305
  */
338
- condition?: string;
339
- }
340
-
341
- interface SetBreakpointByUrlParameterType {
306
+ columnNumber: number;
342
307
  /**
343
- * Line number to set breakpoint at.
308
+ * Script ID of the exception location.
344
309
  */
345
- lineNumber: number;
310
+ scriptId?: Runtime.ScriptId;
346
311
  /**
347
- * URL of the resources to set breakpoint on.
312
+ * URL of the exception location, to be used when the script was not reported.
348
313
  */
349
314
  url?: string;
350
315
  /**
351
- * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
352
- * `urlRegex` must be specified.
353
- */
354
- urlRegex?: string;
355
- /**
356
- * Script hash of the resources to set breakpoint on.
316
+ * JavaScript stack trace if available.
357
317
  */
358
- scriptHash?: string;
318
+ stackTrace?: Runtime.StackTrace;
359
319
  /**
360
- * Offset in the line to set breakpoint at.
320
+ * Exception object if available.
361
321
  */
362
- columnNumber?: number;
322
+ exception?: Runtime.RemoteObject;
363
323
  /**
364
- * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
365
- * breakpoint if this expression evaluates to true.
324
+ * Identifier of the context where exception happened.
366
325
  */
367
- condition?: string;
326
+ executionContextId?: Runtime.ExecutionContextId;
368
327
  }
369
328
 
370
- interface SetBreakpointOnFunctionCallParameterType {
329
+ /**
330
+ * Number of milliseconds since epoch.
331
+ */
332
+ export type Timestamp = number;
333
+
334
+ /**
335
+ * Stack entry for runtime errors and assertions.
336
+ */
337
+ export interface CallFrame {
371
338
  /**
372
- * Function object id.
339
+ * JavaScript function name.
373
340
  */
374
- objectId: Runtime.RemoteObjectId;
341
+ functionName: string;
375
342
  /**
376
- * Expression to use as a breakpoint condition. When specified, debugger will
377
- * stop on the breakpoint if this expression evaluates to true.
343
+ * JavaScript script id.
378
344
  */
379
- condition?: string;
380
- }
381
-
382
- interface SetBreakpointsActiveParameterType {
345
+ scriptId: Runtime.ScriptId;
383
346
  /**
384
- * New value for breakpoints active state.
347
+ * JavaScript script name or url.
385
348
  */
386
- active: boolean;
387
- }
388
-
389
- interface SetPauseOnExceptionsParameterType {
349
+ url: string;
390
350
  /**
391
- * Pause on exceptions mode.
351
+ * JavaScript script line number (0-based).
392
352
  */
393
- state: string;
394
- }
395
-
396
- interface SetReturnValueParameterType {
353
+ lineNumber: number;
397
354
  /**
398
- * New return value.
355
+ * JavaScript script column number (0-based).
399
356
  */
400
- newValue: Runtime.CallArgument;
357
+ columnNumber: number;
401
358
  }
402
359
 
403
- interface SetScriptSourceParameterType {
360
+ /**
361
+ * Call frames for assertions or error messages.
362
+ */
363
+ export interface StackTrace {
404
364
  /**
405
- * Id of the script to edit.
365
+ * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
406
366
  */
407
- scriptId: Runtime.ScriptId;
367
+ description?: string;
408
368
  /**
409
- * New content of the script.
369
+ * JavaScript function name.
410
370
  */
411
- scriptSource: string;
371
+ callFrames: Runtime.CallFrame[];
412
372
  /**
413
- * If true the change will not actually be applied. Dry run may be used to get result
414
- * description without actually modifying the code.
373
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
415
374
  */
416
- dryRun?: boolean;
417
- }
418
-
419
- interface SetSkipAllPausesParameterType {
375
+ parent?: Runtime.StackTrace;
420
376
  /**
421
- * New value for skip pauses state.
377
+ * Creation frame of the Promise which produced the next synchronous trace when resolved, if available.
378
+ * @experimental
422
379
  */
423
- skip: boolean;
380
+ promiseCreationFrame?: Runtime.CallFrame;
424
381
  }
425
382
 
426
- interface SetVariableValueParameterType {
383
+ export interface EvaluateParameterType {
384
+ /**
385
+ * Expression to evaluate.
386
+ */
387
+ expression: string;
427
388
  /**
428
- * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
429
- * scope types are allowed. Other scopes could be manipulated manually.
389
+ * Symbolic group name that can be used to release multiple objects.
430
390
  */
431
- scopeNumber: number;
391
+ objectGroup?: string;
432
392
  /**
433
- * Variable name.
393
+ * Determines whether Command Line API should be available during the evaluation.
434
394
  */
435
- variableName: string;
395
+ includeCommandLineAPI?: boolean;
436
396
  /**
437
- * New variable value.
397
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
438
398
  */
439
- newValue: Runtime.CallArgument;
399
+ silent?: boolean;
440
400
  /**
441
- * Id of callframe that holds variable.
401
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
442
402
  */
443
- callFrameId: CallFrameId;
444
- }
445
-
446
- interface StepIntoParameterType {
403
+ contextId?: Runtime.ExecutionContextId;
447
404
  /**
448
- * Debugger will issue additional Debugger.paused notification if any async task is scheduled
449
- * before next pause.
405
+ * Whether the result is expected to be a JSON object that should be sent by value.
406
+ */
407
+ returnByValue?: boolean;
408
+ /**
409
+ * Whether preview should be generated for the result.
450
410
  * @experimental
451
411
  */
452
- breakOnAsyncCall?: boolean;
453
- }
454
-
455
- interface EnableReturnType {
412
+ generatePreview?: boolean;
456
413
  /**
457
- * Unique identifier of the debugger.
414
+ * Whether execution should be treated as initiated by user in the UI.
458
415
  * @experimental
459
416
  */
460
- debuggerId: Runtime.UniqueDebuggerId;
417
+ userGesture?: boolean;
418
+ /**
419
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
420
+ */
421
+ awaitPromise?: boolean;
461
422
  }
462
423
 
463
- interface EvaluateOnCallFrameReturnType {
424
+ export interface AwaitPromiseParameterType {
464
425
  /**
465
- * Object wrapper for the evaluation result.
426
+ * Identifier of the promise.
466
427
  */
467
- result: Runtime.RemoteObject;
428
+ promiseObjectId: Runtime.RemoteObjectId;
468
429
  /**
469
- * Exception details.
430
+ * Whether the result is expected to be a JSON object that should be sent by value.
470
431
  */
471
- exceptionDetails?: Runtime.ExceptionDetails;
472
- }
473
-
474
- interface GetPossibleBreakpointsReturnType {
432
+ returnByValue?: boolean;
475
433
  /**
476
- * List of the possible breakpoint locations.
434
+ * Whether preview should be generated for the result.
477
435
  */
478
- locations: BreakLocation[];
436
+ generatePreview?: boolean;
479
437
  }
480
438
 
481
- interface GetScriptSourceReturnType {
439
+ export interface CallFunctionOnParameterType {
482
440
  /**
483
- * Script source.
441
+ * Identifier of the object to call function on.
484
442
  */
485
- scriptSource: string;
486
- }
487
-
488
- interface GetStackTraceReturnType {
489
- stackTrace: Runtime.StackTrace;
490
- }
491
-
492
- interface RestartFrameReturnType {
443
+ objectId: Runtime.RemoteObjectId;
493
444
  /**
494
- * New stack trace.
445
+ * Declaration of the function to call.
495
446
  */
496
- callFrames: CallFrame[];
447
+ functionDeclaration: string;
497
448
  /**
498
- * Async stack trace, if any.
449
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
499
450
  */
500
- asyncStackTrace?: Runtime.StackTrace;
451
+ arguments?: Runtime.CallArgument[];
501
452
  /**
502
- * Async stack trace, if any.
453
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
454
+ */
455
+ silent?: boolean;
456
+ /**
457
+ * Whether the result is expected to be a JSON object which should be sent by value.
458
+ */
459
+ returnByValue?: boolean;
460
+ /**
461
+ * Whether preview should be generated for the result.
503
462
  * @experimental
504
463
  */
505
- asyncStackTraceId?: Runtime.StackTraceId;
506
- }
507
-
508
- interface SearchInContentReturnType {
464
+ generatePreview?: boolean;
509
465
  /**
510
- * List of search matches.
466
+ * Whether execution should be treated as initiated by user in the UI.
467
+ * @experimental
511
468
  */
512
- result: SearchMatch[];
469
+ userGesture?: boolean;
470
+ /**
471
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
472
+ */
473
+ awaitPromise?: boolean;
513
474
  }
514
475
 
515
- interface SetBreakpointReturnType {
476
+ export interface GetPropertiesParameterType {
516
477
  /**
517
- * Id of the created breakpoint for further reference.
478
+ * Identifier of the object to return properties for.
518
479
  */
519
- breakpointId: BreakpointId;
480
+ objectId: Runtime.RemoteObjectId;
520
481
  /**
521
- * Location this breakpoint resolved into.
482
+ * If true, returns properties belonging only to the element itself, not to its prototype chain.
522
483
  */
523
- actualLocation: Location;
524
- }
525
-
526
- interface SetBreakpointByUrlReturnType {
484
+ ownProperties?: boolean;
527
485
  /**
528
- * Id of the created breakpoint for further reference.
486
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
487
+ * @experimental
529
488
  */
530
- breakpointId: BreakpointId;
489
+ accessorPropertiesOnly?: boolean;
531
490
  /**
532
- * List of the locations this breakpoint resolved into upon addition.
491
+ * Whether preview should be generated for the results.
492
+ * @experimental
533
493
  */
534
- locations: Location[];
494
+ generatePreview?: boolean;
535
495
  }
536
496
 
537
- interface SetBreakpointOnFunctionCallReturnType {
497
+ export interface ReleaseObjectParameterType {
538
498
  /**
539
- * Id of the created breakpoint for further reference.
499
+ * Identifier of the object to release.
540
500
  */
541
- breakpointId: BreakpointId;
501
+ objectId: Runtime.RemoteObjectId;
542
502
  }
543
503
 
544
- interface SetScriptSourceReturnType {
504
+ export interface ReleaseObjectGroupParameterType {
545
505
  /**
546
- * New stack trace in case editing has happened while VM was stopped.
506
+ * Symbolic object group name.
547
507
  */
548
- callFrames?: CallFrame[];
508
+ objectGroup: string;
509
+ }
510
+
511
+ export interface SetCustomObjectFormatterEnabledParameterType {
512
+ enabled: boolean;
513
+ }
514
+
515
+ export interface CompileScriptParameterType {
549
516
  /**
550
- * Whether current call stack was modified after applying the changes.
517
+ * Expression to compile.
551
518
  */
552
- stackChanged?: boolean;
519
+ expression: string;
553
520
  /**
554
- * Async stack trace, if any.
521
+ * Source url to be set for the script.
555
522
  */
556
- asyncStackTrace?: Runtime.StackTrace;
523
+ sourceURL: string;
557
524
  /**
558
- * Async stack trace, if any.
559
- * @experimental
525
+ * Specifies whether the compiled script should be persisted.
560
526
  */
561
- asyncStackTraceId?: Runtime.StackTraceId;
527
+ persistScript: boolean;
562
528
  /**
563
- * Exception details if any.
529
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
564
530
  */
565
- exceptionDetails?: Runtime.ExceptionDetails;
531
+ executionContextId?: Runtime.ExecutionContextId;
566
532
  }
567
533
 
568
- interface BreakpointResolvedEventDataType {
534
+ export interface RunScriptParameterType {
569
535
  /**
570
- * Breakpoint unique identifier.
536
+ * Id of the script to run.
571
537
  */
572
- breakpointId: BreakpointId;
538
+ scriptId: Runtime.ScriptId;
573
539
  /**
574
- * Actual breakpoint location.
540
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
575
541
  */
576
- location: Location;
577
- }
578
-
579
- interface PausedEventDataType {
542
+ executionContextId?: Runtime.ExecutionContextId;
580
543
  /**
581
- * Call stack the virtual machine stopped on.
544
+ * Symbolic group name that can be used to release multiple objects.
582
545
  */
583
- callFrames: CallFrame[];
546
+ objectGroup?: string;
584
547
  /**
585
- * Pause reason.
548
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
586
549
  */
587
- reason: string;
550
+ silent?: boolean;
588
551
  /**
589
- * Object containing break-specific auxiliary properties.
552
+ * Determines whether Command Line API should be available during the evaluation.
590
553
  */
591
- data?: {};
554
+ includeCommandLineAPI?: boolean;
592
555
  /**
593
- * Hit breakpoints IDs
556
+ * Whether the result is expected to be a JSON object which should be sent by value.
594
557
  */
595
- hitBreakpoints?: string[];
558
+ returnByValue?: boolean;
596
559
  /**
597
- * Async stack trace, if any.
560
+ * Whether preview should be generated for the result.
598
561
  */
599
- asyncStackTrace?: Runtime.StackTrace;
562
+ generatePreview?: boolean;
600
563
  /**
601
- * Async stack trace, if any.
602
- * @experimental
564
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
603
565
  */
604
- asyncStackTraceId?: Runtime.StackTraceId;
566
+ awaitPromise?: boolean;
567
+ }
568
+
569
+ export interface QueryObjectsParameterType {
605
570
  /**
606
- * Just scheduled async call will have this stack trace as parent stack during async execution.
607
- * This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag.
608
- * @experimental
571
+ * Identifier of the prototype to return objects for.
609
572
  */
610
- asyncCallStackTraceId?: Runtime.StackTraceId;
573
+ prototypeObjectId: Runtime.RemoteObjectId;
611
574
  }
612
575
 
613
- interface ScriptFailedToParseEventDataType {
576
+ export interface EvaluateReturnType {
614
577
  /**
615
- * Identifier of the script parsed.
578
+ * Evaluation result.
616
579
  */
617
- scriptId: Runtime.ScriptId;
580
+ result: Runtime.RemoteObject;
618
581
  /**
619
- * URL or name of the script parsed (if any).
582
+ * Exception details.
620
583
  */
621
- url: string;
584
+ exceptionDetails?: Runtime.ExceptionDetails;
585
+ }
586
+
587
+ export interface AwaitPromiseReturnType {
622
588
  /**
623
- * Line offset of the script within the resource with given URL (for script tags).
589
+ * Promise result. Will contain rejected value if promise was rejected.
624
590
  */
625
- startLine: number;
591
+ result: Runtime.RemoteObject;
626
592
  /**
627
- * Column offset of the script within the resource with given URL.
593
+ * Exception details if stack strace is available.
628
594
  */
629
- startColumn: number;
595
+ exceptionDetails?: Runtime.ExceptionDetails;
596
+ }
597
+
598
+ export interface CallFunctionOnReturnType {
630
599
  /**
631
- * Last line of the script.
600
+ * Call result.
632
601
  */
633
- endLine: number;
602
+ result: Runtime.RemoteObject;
634
603
  /**
635
- * Length of the last line of the script.
604
+ * Exception details.
636
605
  */
637
- endColumn: number;
606
+ exceptionDetails?: Runtime.ExceptionDetails;
607
+ }
608
+
609
+ export interface GetPropertiesReturnType {
638
610
  /**
639
- * Specifies script creation context.
611
+ * Object properties.
640
612
  */
641
- executionContextId: Runtime.ExecutionContextId;
613
+ result: Runtime.PropertyDescriptor[];
642
614
  /**
643
- * Content hash of the script.
615
+ * Internal object properties (only of the element itself).
644
616
  */
645
- hash: string;
617
+ internalProperties?: Runtime.InternalPropertyDescriptor[];
646
618
  /**
647
- * Embedder-specific auxiliary data.
619
+ * Exception details.
648
620
  */
649
- executionContextAuxData?: {};
621
+ exceptionDetails?: Runtime.ExceptionDetails;
622
+ }
623
+
624
+ export interface CompileScriptReturnType {
650
625
  /**
651
- * URL of source map associated with script (if any).
626
+ * Id of the script.
652
627
  */
653
- sourceMapURL?: string;
628
+ scriptId?: Runtime.ScriptId;
654
629
  /**
655
- * True, if this script has sourceURL.
630
+ * Exception details.
656
631
  */
657
- hasSourceURL?: boolean;
632
+ exceptionDetails?: Runtime.ExceptionDetails;
633
+ }
634
+
635
+ export interface RunScriptReturnType {
658
636
  /**
659
- * True, if this script is ES6 module.
637
+ * Run result.
660
638
  */
661
- isModule?: boolean;
639
+ result: Runtime.RemoteObject;
662
640
  /**
663
- * This script length.
641
+ * Exception details.
664
642
  */
665
- length?: number;
643
+ exceptionDetails?: Runtime.ExceptionDetails;
644
+ }
645
+
646
+ export interface QueryObjectsReturnType {
666
647
  /**
667
- * JavaScript top stack frame of where the script parsed event was triggered if available.
668
- * @experimental
648
+ * Array with objects.
669
649
  */
670
- stackTrace?: Runtime.StackTrace;
650
+ objects: Runtime.RemoteObject;
671
651
  }
672
652
 
673
- interface ScriptParsedEventDataType {
653
+ export interface ExecutionContextCreatedEventDataType {
674
654
  /**
675
- * Identifier of the script parsed.
676
- */
677
- scriptId: Runtime.ScriptId;
678
- /**
679
- * URL or name of the script parsed (if any).
680
- */
681
- url: string;
682
- /**
683
- * Line offset of the script within the resource with given URL (for script tags).
684
- */
685
- startLine: number;
686
- /**
687
- * Column offset of the script within the resource with given URL.
688
- */
689
- startColumn: number;
690
- /**
691
- * Last line of the script.
655
+ * A newly created execution context.
692
656
  */
693
- endLine: number;
657
+ context: Runtime.ExecutionContextDescription;
658
+ }
659
+
660
+ export interface ExecutionContextDestroyedEventDataType {
694
661
  /**
695
- * Length of the last line of the script.
662
+ * Id of the destroyed context
696
663
  */
697
- endColumn: number;
664
+ executionContextId: Runtime.ExecutionContextId;
665
+ }
666
+
667
+ export interface ExceptionThrownEventDataType {
698
668
  /**
699
- * Specifies script creation context.
669
+ * Timestamp of the exception.
700
670
  */
701
- executionContextId: Runtime.ExecutionContextId;
671
+ timestamp: Runtime.Timestamp;
672
+ exceptionDetails: Runtime.ExceptionDetails;
673
+ }
674
+
675
+ export interface ExceptionRevokedEventDataType {
702
676
  /**
703
- * Content hash of the script.
677
+ * Reason describing why exception was revoked.
704
678
  */
705
- hash: string;
679
+ reason: string;
706
680
  /**
707
- * Embedder-specific auxiliary data.
681
+ * The id of revoked exception, as reported in <code>exceptionUnhandled</code>.
708
682
  */
709
- executionContextAuxData?: {};
683
+ exceptionId: number;
684
+ }
685
+
686
+ export interface ConsoleAPICalledEventDataType {
710
687
  /**
711
- * True, if this script is generated as a result of the live edit operation.
712
- * @experimental
688
+ * Type of the call.
713
689
  */
714
- isLiveEdit?: boolean;
690
+ type: string;
715
691
  /**
716
- * URL of source map associated with script (if any).
692
+ * Call arguments.
717
693
  */
718
- sourceMapURL?: string;
694
+ args: Runtime.RemoteObject[];
719
695
  /**
720
- * True, if this script has sourceURL.
696
+ * Identifier of the context where the call was made.
721
697
  */
722
- hasSourceURL?: boolean;
698
+ executionContextId: Runtime.ExecutionContextId;
723
699
  /**
724
- * True, if this script is ES6 module.
700
+ * Call timestamp.
725
701
  */
726
- isModule?: boolean;
702
+ timestamp: Runtime.Timestamp;
727
703
  /**
728
- * This script length.
704
+ * Stack trace captured when the call was made.
729
705
  */
730
- length?: number;
706
+ stackTrace?: Runtime.StackTrace;
731
707
  /**
732
- * JavaScript top stack frame of where the script parsed event was triggered if available.
708
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
733
709
  * @experimental
734
710
  */
735
- stackTrace?: Runtime.StackTrace;
711
+ context?: string;
712
+ }
713
+
714
+ export interface InspectRequestedEventDataType {
715
+ object: Runtime.RemoteObject;
716
+ hints: {};
736
717
  }
737
718
  }
738
719
 
739
- namespace HeapProfiler {
720
+ export namespace Debugger {
740
721
  /**
741
- * Heap snapshot object id.
722
+ * Breakpoint identifier.
742
723
  */
743
- type HeapSnapshotObjectId = string;
724
+ export type BreakpointId = string;
744
725
 
745
726
  /**
746
- * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
727
+ * Call frame identifier.
728
+ */
729
+ export type CallFrameId = string;
730
+
731
+ /**
732
+ * Location in the source code.
747
733
  */
748
- interface SamplingHeapProfileNode {
734
+ export interface Location {
749
735
  /**
750
- * Function location.
736
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
751
737
  */
752
- callFrame: Runtime.CallFrame;
738
+ scriptId: Runtime.ScriptId;
753
739
  /**
754
- * Allocations size in bytes for the node excluding children.
740
+ * Line number in the script (0-based).
755
741
  */
756
- selfSize: number;
742
+ lineNumber: number;
757
743
  /**
758
- * Child nodes.
744
+ * Column number in the script (0-based).
759
745
  */
760
- children: SamplingHeapProfileNode[];
746
+ columnNumber?: number;
761
747
  }
762
748
 
763
749
  /**
764
- * Profile.
750
+ * Location in the source code.
751
+ * @experimental
765
752
  */
766
- interface SamplingHeapProfile {
767
- head: SamplingHeapProfileNode;
753
+ export interface ScriptPosition {
754
+ lineNumber: number;
755
+ columnNumber: number;
768
756
  }
769
757
 
770
- interface AddInspectedHeapObjectParameterType {
758
+ /**
759
+ * JavaScript call frame. Array of call frames form the call stack.
760
+ */
761
+ export interface CallFrame {
771
762
  /**
772
- * Heap snapshot object id to be accessible by means of $x command line API.
763
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
773
764
  */
774
- heapObjectId: HeapSnapshotObjectId;
775
- }
776
-
777
- interface GetHeapObjectIdParameterType {
765
+ callFrameId: Debugger.CallFrameId;
778
766
  /**
779
- * Identifier of the object to get heap object id for.
767
+ * Name of the JavaScript function called on this call frame.
780
768
  */
781
- objectId: Runtime.RemoteObjectId;
782
- }
783
-
784
- interface GetObjectByHeapObjectIdParameterType {
785
- objectId: HeapSnapshotObjectId;
769
+ functionName: string;
786
770
  /**
787
- * Symbolic group name that can be used to release multiple objects.
771
+ * Location in the source code.
772
+ * @experimental
788
773
  */
789
- objectGroup?: string;
790
- }
791
-
792
- interface StartSamplingParameterType {
774
+ functionLocation?: Debugger.Location;
793
775
  /**
794
- * Average sample interval in bytes. Poisson distribution is used for the intervals. The
795
- * default value is 32768 bytes.
776
+ * Location in the source code.
796
777
  */
797
- samplingInterval?: number;
798
- }
799
-
800
- interface StartTrackingHeapObjectsParameterType {
801
- trackAllocations?: boolean;
802
- }
803
-
804
- interface StopTrackingHeapObjectsParameterType {
778
+ location: Debugger.Location;
805
779
  /**
806
- * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
807
- * when the tracking is stopped.
780
+ * Scope chain for this call frame.
808
781
  */
809
- reportProgress?: boolean;
810
- }
811
-
812
- interface TakeHeapSnapshotParameterType {
782
+ scopeChain: Debugger.Scope[];
813
783
  /**
814
- * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
784
+ * <code>this</code> object for this call frame.
815
785
  */
816
- reportProgress?: boolean;
817
- }
818
-
819
- interface GetHeapObjectIdReturnType {
786
+ this: Runtime.RemoteObject;
820
787
  /**
821
- * Id of the heap snapshot object corresponding to the passed remote object id.
788
+ * The value being returned, if the function is at return point.
822
789
  */
823
- heapSnapshotObjectId: HeapSnapshotObjectId;
790
+ returnValue?: Runtime.RemoteObject;
824
791
  }
825
792
 
826
- interface GetObjectByHeapObjectIdReturnType {
793
+ /**
794
+ * Scope description.
795
+ */
796
+ export interface Scope {
827
797
  /**
828
- * Evaluation result.
798
+ * Scope type.
829
799
  */
830
- result: Runtime.RemoteObject;
831
- }
832
-
833
- interface GetSamplingProfileReturnType {
800
+ type: string;
834
801
  /**
835
- * Return the sampling profile being collected.
802
+ * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
836
803
  */
837
- profile: SamplingHeapProfile;
838
- }
839
-
840
- interface StopSamplingReturnType {
804
+ object: Runtime.RemoteObject;
805
+ name?: string;
841
806
  /**
842
- * Recorded sampling heap profile.
807
+ * Location in the source code where scope starts
843
808
  */
844
- profile: SamplingHeapProfile;
845
- }
846
-
847
- interface AddHeapSnapshotChunkEventDataType {
848
- chunk: string;
849
- }
850
-
851
- interface HeapStatsUpdateEventDataType {
809
+ startLocation?: Debugger.Location;
852
810
  /**
853
- * An array of triplets. Each triplet describes a fragment. The first integer is the fragment
854
- * index, the second integer is a total count of objects for the fragment, the third integer is
855
- * a total size of the objects for the fragment.
811
+ * Location in the source code where scope ends
856
812
  */
857
- statsUpdate: number[];
858
- }
859
-
860
- interface LastSeenObjectIdEventDataType {
861
- lastSeenObjectId: number;
862
- timestamp: number;
863
- }
864
-
865
- interface ReportHeapSnapshotProgressEventDataType {
866
- done: number;
867
- total: number;
868
- finished?: boolean;
813
+ endLocation?: Debugger.Location;
869
814
  }
870
- }
871
815
 
872
- namespace Profiler {
873
816
  /**
874
- * Profile node. Holds callsite information, execution statistics and child nodes.
817
+ * Search match for resource.
818
+ * @experimental
875
819
  */
876
- interface ProfileNode {
820
+ export interface SearchMatch {
877
821
  /**
878
- * Unique id of the node.
822
+ * Line number in resource content.
879
823
  */
880
- id: number;
824
+ lineNumber: number;
881
825
  /**
882
- * Function location.
826
+ * Line with match content.
883
827
  */
884
- callFrame: Runtime.CallFrame;
828
+ lineContent: string;
829
+ }
830
+
831
+ /**
832
+ * @experimental
833
+ */
834
+ export interface BreakLocation {
885
835
  /**
886
- * Number of samples where this node was on top of the call stack.
836
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
887
837
  */
888
- hitCount?: number;
838
+ scriptId: Runtime.ScriptId;
889
839
  /**
890
- * Child node ids.
840
+ * Line number in the script (0-based).
891
841
  */
892
- children?: number[];
842
+ lineNumber: number;
893
843
  /**
894
- * The reason of being not optimized. The function may be deoptimized or marked as don't
895
- * optimize.
844
+ * Column number in the script (0-based).
896
845
  */
897
- deoptReason?: string;
846
+ columnNumber?: number;
847
+ type?: string;
848
+ }
849
+
850
+ export interface SetBreakpointsActiveParameterType {
898
851
  /**
899
- * An array of source position ticks.
852
+ * New value for breakpoints active state.
853
+ */
854
+ active: boolean;
855
+ }
856
+
857
+ export interface SetSkipAllPausesParameterType {
858
+ /**
859
+ * New value for skip pauses state.
900
860
  */
901
- positionTicks?: PositionTickInfo[];
861
+ skip: boolean;
902
862
  }
903
863
 
904
- /**
905
- * Profile.
906
- */
907
- interface Profile {
864
+ export interface SetBreakpointByUrlParameterType {
908
865
  /**
909
- * The list of profile nodes. First item is the root node.
866
+ * Line number to set breakpoint at.
910
867
  */
911
- nodes: ProfileNode[];
868
+ lineNumber: number;
912
869
  /**
913
- * Profiling start timestamp in microseconds.
870
+ * URL of the resources to set breakpoint on.
914
871
  */
915
- startTime: number;
872
+ url?: string;
916
873
  /**
917
- * Profiling end timestamp in microseconds.
874
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
918
875
  */
919
- endTime: number;
876
+ urlRegex?: string;
920
877
  /**
921
- * Ids of samples top nodes.
878
+ * Offset in the line to set breakpoint at.
922
879
  */
923
- samples?: number[];
880
+ columnNumber?: number;
924
881
  /**
925
- * Time intervals between adjacent samples in microseconds. The first delta is relative to the
926
- * profile startTime.
882
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
927
883
  */
928
- timeDeltas?: number[];
884
+ condition?: string;
929
885
  }
930
886
 
931
- /**
932
- * Specifies a number of samples attributed to a certain source position.
933
- */
934
- interface PositionTickInfo {
887
+ export interface SetBreakpointParameterType {
935
888
  /**
936
- * Source line number (1-based).
889
+ * Location to set breakpoint in.
937
890
  */
938
- line: number;
891
+ location: Debugger.Location;
939
892
  /**
940
- * Number of samples attributed to the source line.
893
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
941
894
  */
942
- ticks: number;
895
+ condition?: string;
943
896
  }
944
897
 
945
- /**
946
- * Coverage data for a source range.
947
- */
948
- interface CoverageRange {
898
+ export interface RemoveBreakpointParameterType {
899
+ breakpointId: Debugger.BreakpointId;
900
+ }
901
+
902
+ export interface GetPossibleBreakpointsParameterType {
949
903
  /**
950
- * JavaScript script source offset for the range start.
904
+ * Start of range to search possible breakpoint locations in.
951
905
  */
952
- startOffset: number;
906
+ start: Debugger.Location;
953
907
  /**
954
- * JavaScript script source offset for the range end.
908
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
955
909
  */
956
- endOffset: number;
910
+ end?: Debugger.Location;
957
911
  /**
958
- * Collected execution count of the source range.
912
+ * Only consider locations which are in the same (non-nested) function as start.
959
913
  */
960
- count: number;
914
+ restrictToFunction?: boolean;
961
915
  }
962
916
 
963
- /**
964
- * Coverage data for a JavaScript function.
965
- */
966
- interface FunctionCoverage {
967
- /**
968
- * JavaScript function name.
969
- */
970
- functionName: string;
917
+ export interface ContinueToLocationParameterType {
971
918
  /**
972
- * Source ranges inside the function with coverage data.
919
+ * Location to continue to.
973
920
  */
974
- ranges: CoverageRange[];
921
+ location: Debugger.Location;
975
922
  /**
976
- * Whether coverage data for this function has block granularity.
923
+ * @experimental
977
924
  */
978
- isBlockCoverage: boolean;
925
+ targetCallFrames?: string;
979
926
  }
980
927
 
981
- /**
982
- * Coverage data for a JavaScript script.
983
- */
984
- interface ScriptCoverage {
928
+ export interface SearchInContentParameterType {
985
929
  /**
986
- * JavaScript script id.
930
+ * Id of the script to search in.
987
931
  */
988
932
  scriptId: Runtime.ScriptId;
989
933
  /**
990
- * JavaScript script name or url.
991
- */
992
- url: string;
993
- /**
994
- * Functions contained in the script that has coverage data.
995
- */
996
- functions: FunctionCoverage[];
997
- }
998
-
999
- /**
1000
- * Describes a type collected during runtime.
1001
- * @experimental
1002
- */
1003
- interface TypeObject {
1004
- /**
1005
- * Name of a type collected with type profiling.
934
+ * String to search for.
1006
935
  */
1007
- name: string;
1008
- }
1009
-
1010
- /**
1011
- * Source offset and types for a parameter or return value.
1012
- * @experimental
1013
- */
1014
- interface TypeProfileEntry {
936
+ query: string;
1015
937
  /**
1016
- * Source offset of the parameter or end of function for return values.
938
+ * If true, search is case sensitive.
1017
939
  */
1018
- offset: number;
940
+ caseSensitive?: boolean;
1019
941
  /**
1020
- * The types for this parameter or return value.
942
+ * If true, treats string parameter as regex.
1021
943
  */
1022
- types: TypeObject[];
944
+ isRegex?: boolean;
1023
945
  }
1024
946
 
1025
- /**
1026
- * Type profile data collected during runtime for a JavaScript script.
1027
- * @experimental
1028
- */
1029
- interface ScriptTypeProfile {
947
+ export interface SetScriptSourceParameterType {
1030
948
  /**
1031
- * JavaScript script id.
949
+ * Id of the script to edit.
1032
950
  */
1033
951
  scriptId: Runtime.ScriptId;
1034
952
  /**
1035
- * JavaScript script name or url.
1036
- */
1037
- url: string;
1038
- /**
1039
- * Type profile entries for parameters and return values of the functions in the script.
1040
- */
1041
- entries: TypeProfileEntry[];
1042
- }
1043
-
1044
- interface SetSamplingIntervalParameterType {
1045
- /**
1046
- * New sampling interval in microseconds.
1047
- */
1048
- interval: number;
1049
- }
1050
-
1051
- interface StartPreciseCoverageParameterType {
1052
- /**
1053
- * Collect accurate call counts beyond simple 'covered' or 'not covered'.
1054
- */
1055
- callCount?: boolean;
1056
- /**
1057
- * Collect block-based coverage.
1058
- */
1059
- detailed?: boolean;
1060
- }
1061
-
1062
- interface GetBestEffortCoverageReturnType {
1063
- /**
1064
- * Coverage data for the current isolate.
1065
- */
1066
- result: ScriptCoverage[];
1067
- }
1068
-
1069
- interface StopReturnType {
1070
- /**
1071
- * Recorded profile.
953
+ * New content of the script.
1072
954
  */
1073
- profile: Profile;
1074
- }
1075
-
1076
- interface TakePreciseCoverageReturnType {
955
+ scriptSource: string;
1077
956
  /**
1078
- * Coverage data for the current isolate.
957
+ * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
1079
958
  */
1080
- result: ScriptCoverage[];
959
+ dryRun?: boolean;
1081
960
  }
1082
961
 
1083
- interface TakeTypeProfileReturnType {
962
+ export interface RestartFrameParameterType {
1084
963
  /**
1085
- * Type profile for all scripts since startTypeProfile() was turned on.
964
+ * Call frame identifier to evaluate on.
1086
965
  */
1087
- result: ScriptTypeProfile[];
966
+ callFrameId: Debugger.CallFrameId;
1088
967
  }
1089
968
 
1090
- interface ConsoleProfileFinishedEventDataType {
1091
- id: string;
1092
- /**
1093
- * Location of console.profileEnd().
1094
- */
1095
- location: Debugger.Location;
1096
- profile: Profile;
969
+ export interface GetScriptSourceParameterType {
1097
970
  /**
1098
- * Profile title passed as an argument to console.profile().
971
+ * Id of the script to get source for.
1099
972
  */
1100
- title?: string;
973
+ scriptId: Runtime.ScriptId;
1101
974
  }
1102
975
 
1103
- interface ConsoleProfileStartedEventDataType {
1104
- id: string;
976
+ export interface SetPauseOnExceptionsParameterType {
1105
977
  /**
1106
- * Location of console.profile().
1107
- */
1108
- location: Debugger.Location;
1109
- /**
1110
- * Profile title passed as an argument to console.profile().
978
+ * Pause on exceptions mode.
1111
979
  */
1112
- title?: string;
980
+ state: string;
1113
981
  }
1114
- }
1115
-
1116
- namespace Runtime {
1117
- /**
1118
- * Unique script identifier.
1119
- */
1120
- type ScriptId = string;
1121
-
1122
- /**
1123
- * Unique object identifier.
1124
- */
1125
- type RemoteObjectId = string;
1126
982
 
1127
- /**
1128
- * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
1129
- * `-Infinity`, and bigint literals.
1130
- */
1131
- type UnserializableValue = string;
1132
-
1133
- /**
1134
- * Mirror object referencing original JavaScript object.
1135
- */
1136
- interface RemoteObject {
983
+ export interface EvaluateOnCallFrameParameterType {
1137
984
  /**
1138
- * Object type.
1139
- */
1140
- type: string;
1141
- /**
1142
- * Object subtype hint. Specified for `object` type values only.
985
+ * Call frame identifier to evaluate on.
1143
986
  */
1144
- subtype?: string;
987
+ callFrameId: Debugger.CallFrameId;
1145
988
  /**
1146
- * Object class (constructor) name. Specified for `object` type values only.
989
+ * Expression to evaluate.
1147
990
  */
1148
- className?: string;
991
+ expression: string;
1149
992
  /**
1150
- * Remote object value in case of primitive values or JSON values (if it was requested).
993
+ * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
1151
994
  */
1152
- value?: any;
995
+ objectGroup?: string;
1153
996
  /**
1154
- * Primitive value which can not be JSON-stringified does not have `value`, but gets this
1155
- * property.
997
+ * Specifies whether command line API should be available to the evaluated expression, defaults to false.
1156
998
  */
1157
- unserializableValue?: UnserializableValue;
999
+ includeCommandLineAPI?: boolean;
1158
1000
  /**
1159
- * String representation of the object.
1001
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
1160
1002
  */
1161
- description?: string;
1003
+ silent?: boolean;
1162
1004
  /**
1163
- * Unique object identifier (for non-primitive values).
1005
+ * Whether the result is expected to be a JSON object that should be sent by value.
1164
1006
  */
1165
- objectId?: RemoteObjectId;
1007
+ returnByValue?: boolean;
1166
1008
  /**
1167
- * Preview containing abbreviated property values. Specified for `object` type values only.
1009
+ * Whether preview should be generated for the result.
1168
1010
  * @experimental
1169
1011
  */
1170
- preview?: ObjectPreview;
1012
+ generatePreview?: boolean;
1171
1013
  /**
1014
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
1172
1015
  * @experimental
1173
1016
  */
1174
- customPreview?: CustomPreview;
1175
- }
1176
-
1177
- /**
1178
- * @experimental
1179
- */
1180
- interface CustomPreview {
1181
- header: string;
1182
- hasBody: boolean;
1183
- formatterObjectId: RemoteObjectId;
1184
- bindRemoteObjectFunctionId: RemoteObjectId;
1185
- configObjectId?: RemoteObjectId;
1017
+ throwOnSideEffect?: boolean;
1186
1018
  }
1187
1019
 
1188
- /**
1189
- * Object containing abbreviated remote object value.
1190
- * @experimental
1191
- */
1192
- interface ObjectPreview {
1020
+ export interface SetVariableValueParameterType {
1193
1021
  /**
1194
- * Object type.
1195
- */
1196
- type: string;
1197
- /**
1198
- * Object subtype hint. Specified for `object` type values only.
1199
- */
1200
- subtype?: string;
1201
- /**
1202
- * String representation of the object.
1022
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
1203
1023
  */
1204
- description?: string;
1024
+ scopeNumber: number;
1205
1025
  /**
1206
- * True iff some of the properties or entries of the original object did not fit.
1026
+ * Variable name.
1207
1027
  */
1208
- overflow: boolean;
1028
+ variableName: string;
1209
1029
  /**
1210
- * List of the properties.
1030
+ * New variable value.
1211
1031
  */
1212
- properties: PropertyPreview[];
1032
+ newValue: Runtime.CallArgument;
1213
1033
  /**
1214
- * List of the entries. Specified for `map` and `set` subtype values only.
1034
+ * Id of callframe that holds variable.
1215
1035
  */
1216
- entries?: EntryPreview[];
1036
+ callFrameId: Debugger.CallFrameId;
1217
1037
  }
1218
1038
 
1219
- /**
1220
- * @experimental
1221
- */
1222
- interface PropertyPreview {
1039
+ export interface SetAsyncCallStackDepthParameterType {
1223
1040
  /**
1224
- * Property name.
1041
+ * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
1225
1042
  */
1226
- name: string;
1227
- /**
1228
- * Object type. Accessor means that the property itself is an accessor property.
1229
- */
1230
- type: string;
1231
- /**
1232
- * User-friendly property value string.
1233
- */
1234
- value?: string;
1235
- /**
1236
- * Nested value preview.
1237
- */
1238
- valuePreview?: ObjectPreview;
1239
- /**
1240
- * Object subtype hint. Specified for `object` type values only.
1241
- */
1242
- subtype?: string;
1043
+ maxDepth: number;
1243
1044
  }
1244
1045
 
1245
- /**
1246
- * @experimental
1247
- */
1248
- interface EntryPreview {
1046
+ export interface SetBlackboxPatternsParameterType {
1249
1047
  /**
1250
- * Preview of the key. Specified for map-like collection entries.
1048
+ * Array of regexps that will be used to check script url for blackbox state.
1251
1049
  */
1252
- key?: ObjectPreview;
1050
+ patterns: string[];
1051
+ }
1052
+
1053
+ export interface SetBlackboxedRangesParameterType {
1253
1054
  /**
1254
- * Preview of the value.
1055
+ * Id of the script.
1255
1056
  */
1256
- value: ObjectPreview;
1057
+ scriptId: Runtime.ScriptId;
1058
+ positions: Debugger.ScriptPosition[];
1257
1059
  }
1258
1060
 
1259
- /**
1260
- * Object property descriptor.
1261
- */
1262
- interface PropertyDescriptor {
1061
+ export interface SetBreakpointByUrlReturnType {
1263
1062
  /**
1264
- * Property name or symbol description.
1063
+ * Id of the created breakpoint for further reference.
1265
1064
  */
1266
- name: string;
1065
+ breakpointId: Debugger.BreakpointId;
1267
1066
  /**
1268
- * The value associated with the property.
1067
+ * List of the locations this breakpoint resolved into upon addition.
1269
1068
  */
1270
- value?: RemoteObject;
1069
+ locations: Debugger.Location[];
1070
+ }
1071
+
1072
+ export interface SetBreakpointReturnType {
1271
1073
  /**
1272
- * True if the value associated with the property may be changed (data descriptors only).
1074
+ * Id of the created breakpoint for further reference.
1273
1075
  */
1274
- writable?: boolean;
1076
+ breakpointId: Debugger.BreakpointId;
1275
1077
  /**
1276
- * A function which serves as a getter for the property, or `undefined` if there is no getter
1277
- * (accessor descriptors only).
1078
+ * Location this breakpoint resolved into.
1278
1079
  */
1279
- get?: RemoteObject;
1080
+ actualLocation: Debugger.Location;
1081
+ }
1082
+
1083
+ export interface GetPossibleBreakpointsReturnType {
1280
1084
  /**
1281
- * A function which serves as a setter for the property, or `undefined` if there is no setter
1282
- * (accessor descriptors only).
1085
+ * List of the possible breakpoint locations.
1283
1086
  */
1284
- set?: RemoteObject;
1087
+ locations: Debugger.BreakLocation[];
1088
+ }
1089
+
1090
+ export interface SearchInContentReturnType {
1285
1091
  /**
1286
- * True if the type of this property descriptor may be changed and if the property may be
1287
- * deleted from the corresponding object.
1092
+ * List of search matches.
1288
1093
  */
1289
- configurable: boolean;
1094
+ result: Debugger.SearchMatch[];
1095
+ }
1096
+
1097
+ export interface SetScriptSourceReturnType {
1290
1098
  /**
1291
- * True if this property shows up during enumeration of the properties on the corresponding
1292
- * object.
1099
+ * New stack trace in case editing has happened while VM was stopped.
1293
1100
  */
1294
- enumerable: boolean;
1101
+ callFrames?: Debugger.CallFrame[];
1295
1102
  /**
1296
- * True if the result was thrown during the evaluation.
1103
+ * Whether current call stack was modified after applying the changes.
1297
1104
  */
1298
- wasThrown?: boolean;
1105
+ stackChanged?: boolean;
1299
1106
  /**
1300
- * True if the property is owned for the object.
1107
+ * Async stack trace, if any.
1301
1108
  */
1302
- isOwn?: boolean;
1109
+ asyncStackTrace?: Runtime.StackTrace;
1303
1110
  /**
1304
- * Property symbol object, if the property is of the `symbol` type.
1111
+ * Exception details if any.
1305
1112
  */
1306
- symbol?: RemoteObject;
1113
+ exceptionDetails?: Runtime.ExceptionDetails;
1307
1114
  }
1308
1115
 
1309
- /**
1310
- * Object internal property descriptor. This property isn't normally visible in JavaScript code.
1311
- */
1312
- interface InternalPropertyDescriptor {
1116
+ export interface RestartFrameReturnType {
1313
1117
  /**
1314
- * Conventional property name.
1118
+ * New stack trace.
1315
1119
  */
1316
- name: string;
1120
+ callFrames: Debugger.CallFrame[];
1317
1121
  /**
1318
- * The value associated with the property.
1122
+ * Async stack trace, if any.
1319
1123
  */
1320
- value?: RemoteObject;
1124
+ asyncStackTrace?: Runtime.StackTrace;
1321
1125
  }
1322
1126
 
1323
- /**
1324
- * Represents function call argument. Either remote object id `objectId`, primitive `value`,
1325
- * unserializable primitive value or neither of (for undefined) them should be specified.
1326
- */
1327
- interface CallArgument {
1328
- /**
1329
- * Primitive value or serializable javascript object.
1330
- */
1331
- value?: any;
1332
- /**
1333
- * Primitive value which can not be JSON-stringified.
1334
- */
1335
- unserializableValue?: UnserializableValue;
1127
+ export interface GetScriptSourceReturnType {
1336
1128
  /**
1337
- * Remote object handle.
1129
+ * Script source.
1338
1130
  */
1339
- objectId?: RemoteObjectId;
1131
+ scriptSource: string;
1340
1132
  }
1341
1133
 
1342
- /**
1343
- * Id of an execution context.
1344
- */
1345
- type ExecutionContextId = number;
1346
-
1347
- /**
1348
- * Description of an isolated world.
1349
- */
1350
- interface ExecutionContextDescription {
1351
- /**
1352
- * Unique id of the execution context. It can be used to specify in which execution context
1353
- * script evaluation should be performed.
1354
- */
1355
- id: ExecutionContextId;
1134
+ export interface EvaluateOnCallFrameReturnType {
1356
1135
  /**
1357
- * Execution context origin.
1358
- */
1359
- origin: string;
1360
- /**
1361
- * Human readable name describing given context.
1136
+ * Object wrapper for the evaluation result.
1362
1137
  */
1363
- name: string;
1138
+ result: Runtime.RemoteObject;
1364
1139
  /**
1365
- * Embedder-specific auxiliary data.
1140
+ * Exception details.
1366
1141
  */
1367
- auxData?: {};
1142
+ exceptionDetails?: Runtime.ExceptionDetails;
1368
1143
  }
1369
1144
 
1370
- /**
1371
- * Detailed information about exception (or error) that was thrown during script compilation or
1372
- * execution.
1373
- */
1374
- interface ExceptionDetails {
1145
+ export interface ScriptParsedEventDataType {
1375
1146
  /**
1376
- * Exception id.
1147
+ * Identifier of the script parsed.
1377
1148
  */
1378
- exceptionId: number;
1149
+ scriptId: Runtime.ScriptId;
1379
1150
  /**
1380
- * Exception text, which should be used together with exception object when available.
1151
+ * URL or name of the script parsed (if any).
1381
1152
  */
1382
- text: string;
1153
+ url: string;
1383
1154
  /**
1384
- * Line number of the exception location (0-based).
1155
+ * Line offset of the script within the resource with given URL (for script tags).
1385
1156
  */
1386
- lineNumber: number;
1157
+ startLine: number;
1387
1158
  /**
1388
- * Column number of the exception location (0-based).
1159
+ * Column offset of the script within the resource with given URL.
1389
1160
  */
1390
- columnNumber: number;
1161
+ startColumn: number;
1391
1162
  /**
1392
- * Script ID of the exception location.
1163
+ * Last line of the script.
1393
1164
  */
1394
- scriptId?: ScriptId;
1165
+ endLine: number;
1395
1166
  /**
1396
- * URL of the exception location, to be used when the script was not reported.
1167
+ * Length of the last line of the script.
1397
1168
  */
1398
- url?: string;
1169
+ endColumn: number;
1399
1170
  /**
1400
- * JavaScript stack trace if available.
1171
+ * Specifies script creation context.
1401
1172
  */
1402
- stackTrace?: StackTrace;
1173
+ executionContextId: Runtime.ExecutionContextId;
1403
1174
  /**
1404
- * Exception object if available.
1175
+ * Content hash of the script.
1405
1176
  */
1406
- exception?: RemoteObject;
1177
+ hash: string;
1407
1178
  /**
1408
- * Identifier of the context where exception happened.
1179
+ * Embedder-specific auxiliary data.
1409
1180
  */
1410
- executionContextId?: ExecutionContextId;
1411
- }
1412
-
1413
- /**
1414
- * Number of milliseconds since epoch.
1415
- */
1416
- type Timestamp = number;
1417
-
1418
- /**
1419
- * Number of milliseconds.
1420
- */
1421
- type TimeDelta = number;
1422
-
1423
- /**
1424
- * Stack entry for runtime errors and assertions.
1425
- */
1426
- interface CallFrame {
1181
+ executionContextAuxData?: {};
1427
1182
  /**
1428
- * JavaScript function name.
1183
+ * True, if this script is generated as a result of the live edit operation.
1184
+ * @experimental
1429
1185
  */
1430
- functionName: string;
1186
+ isLiveEdit?: boolean;
1431
1187
  /**
1432
- * JavaScript script id.
1188
+ * URL of source map associated with script (if any).
1433
1189
  */
1434
- scriptId: ScriptId;
1190
+ sourceMapURL?: string;
1435
1191
  /**
1436
- * JavaScript script name or url.
1192
+ * True, if this script has sourceURL.
1193
+ * @experimental
1437
1194
  */
1438
- url: string;
1195
+ hasSourceURL?: boolean;
1439
1196
  /**
1440
- * JavaScript script line number (0-based).
1197
+ * True, if this script is ES6 module.
1198
+ * @experimental
1441
1199
  */
1442
- lineNumber: number;
1200
+ isModule?: boolean;
1443
1201
  /**
1444
- * JavaScript script column number (0-based).
1202
+ * This script length.
1203
+ * @experimental
1445
1204
  */
1446
- columnNumber: number;
1447
- }
1448
-
1449
- /**
1450
- * Call frames for assertions or error messages.
1451
- */
1452
- interface StackTrace {
1205
+ length?: number;
1453
1206
  /**
1454
- * String label of this stack trace. For async traces this may be a name of the function that
1455
- * initiated the async call.
1207
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
1208
+ * @experimental
1456
1209
  */
1457
- description?: string;
1210
+ stackTrace?: Runtime.StackTrace;
1211
+ }
1212
+
1213
+ export interface ScriptFailedToParseEventDataType {
1458
1214
  /**
1459
- * JavaScript function name.
1215
+ * Identifier of the script parsed.
1460
1216
  */
1461
- callFrames: CallFrame[];
1217
+ scriptId: Runtime.ScriptId;
1462
1218
  /**
1463
- * Asynchronous JavaScript stack trace that preceded this stack, if available.
1219
+ * URL or name of the script parsed (if any).
1464
1220
  */
1465
- parent?: StackTrace;
1221
+ url: string;
1466
1222
  /**
1467
- * Asynchronous JavaScript stack trace that preceded this stack, if available.
1468
- * @experimental
1469
- */
1470
- parentId?: StackTraceId;
1471
- }
1472
-
1473
- /**
1474
- * Unique identifier of current debugger.
1475
- * @experimental
1476
- */
1477
- type UniqueDebuggerId = string;
1478
-
1479
- /**
1480
- * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
1481
- * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
1482
- * @experimental
1483
- */
1484
- interface StackTraceId {
1485
- id: string;
1486
- debuggerId?: UniqueDebuggerId;
1487
- }
1488
-
1489
- interface AwaitPromiseParameterType {
1223
+ * Line offset of the script within the resource with given URL (for script tags).
1224
+ */
1225
+ startLine: number;
1490
1226
  /**
1491
- * Identifier of the promise.
1227
+ * Column offset of the script within the resource with given URL.
1492
1228
  */
1493
- promiseObjectId: RemoteObjectId;
1229
+ startColumn: number;
1494
1230
  /**
1495
- * Whether the result is expected to be a JSON object that should be sent by value.
1231
+ * Last line of the script.
1496
1232
  */
1497
- returnByValue?: boolean;
1233
+ endLine: number;
1498
1234
  /**
1499
- * Whether preview should be generated for the result.
1235
+ * Length of the last line of the script.
1500
1236
  */
1501
- generatePreview?: boolean;
1502
- }
1503
-
1504
- interface CallFunctionOnParameterType {
1237
+ endColumn: number;
1505
1238
  /**
1506
- * Declaration of the function to call.
1239
+ * Specifies script creation context.
1507
1240
  */
1508
- functionDeclaration: string;
1241
+ executionContextId: Runtime.ExecutionContextId;
1509
1242
  /**
1510
- * Identifier of the object to call function on. Either objectId or executionContextId should
1511
- * be specified.
1243
+ * Content hash of the script.
1512
1244
  */
1513
- objectId?: RemoteObjectId;
1245
+ hash: string;
1514
1246
  /**
1515
- * Call arguments. All call arguments must belong to the same JavaScript world as the target
1516
- * object.
1247
+ * Embedder-specific auxiliary data.
1517
1248
  */
1518
- arguments?: CallArgument[];
1249
+ executionContextAuxData?: {};
1519
1250
  /**
1520
- * In silent mode exceptions thrown during evaluation are not reported and do not pause
1521
- * execution. Overrides `setPauseOnException` state.
1251
+ * URL of source map associated with script (if any).
1522
1252
  */
1523
- silent?: boolean;
1253
+ sourceMapURL?: string;
1524
1254
  /**
1525
- * Whether the result is expected to be a JSON object which should be sent by value.
1255
+ * True, if this script has sourceURL.
1256
+ * @experimental
1526
1257
  */
1527
- returnByValue?: boolean;
1258
+ hasSourceURL?: boolean;
1528
1259
  /**
1529
- * Whether preview should be generated for the result.
1260
+ * True, if this script is ES6 module.
1530
1261
  * @experimental
1531
1262
  */
1532
- generatePreview?: boolean;
1263
+ isModule?: boolean;
1533
1264
  /**
1534
- * Whether execution should be treated as initiated by user in the UI.
1265
+ * This script length.
1266
+ * @experimental
1535
1267
  */
1536
- userGesture?: boolean;
1268
+ length?: number;
1537
1269
  /**
1538
- * Whether execution should `await` for resulting value and return once awaited promise is
1539
- * resolved.
1270
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
1271
+ * @experimental
1540
1272
  */
1541
- awaitPromise?: boolean;
1273
+ stackTrace?: Runtime.StackTrace;
1274
+ }
1275
+
1276
+ export interface BreakpointResolvedEventDataType {
1542
1277
  /**
1543
- * Specifies execution context which global object will be used to call function on. Either
1544
- * executionContextId or objectId should be specified.
1278
+ * Breakpoint unique identifier.
1545
1279
  */
1546
- executionContextId?: ExecutionContextId;
1280
+ breakpointId: Debugger.BreakpointId;
1547
1281
  /**
1548
- * Symbolic group name that can be used to release multiple objects. If objectGroup is not
1549
- * specified and objectId is, objectGroup will be inherited from object.
1282
+ * Actual breakpoint location.
1550
1283
  */
1551
- objectGroup?: string;
1284
+ location: Debugger.Location;
1552
1285
  }
1553
1286
 
1554
- interface CompileScriptParameterType {
1287
+ export interface PausedEventDataType {
1555
1288
  /**
1556
- * Expression to compile.
1289
+ * Call stack the virtual machine stopped on.
1557
1290
  */
1558
- expression: string;
1291
+ callFrames: Debugger.CallFrame[];
1559
1292
  /**
1560
- * Source url to be set for the script.
1293
+ * Pause reason.
1561
1294
  */
1562
- sourceURL: string;
1295
+ reason: string;
1563
1296
  /**
1564
- * Specifies whether the compiled script should be persisted.
1297
+ * Object containing break-specific auxiliary properties.
1565
1298
  */
1566
- persistScript: boolean;
1299
+ data?: {};
1300
+ /**
1301
+ * Hit breakpoints IDs
1302
+ */
1303
+ hitBreakpoints?: string[];
1567
1304
  /**
1568
- * Specifies in which execution context to perform script run. If the parameter is omitted the
1569
- * evaluation will be performed in the context of the inspected page.
1305
+ * Async stack trace, if any.
1570
1306
  */
1571
- executionContextId?: ExecutionContextId;
1307
+ asyncStackTrace?: Runtime.StackTrace;
1572
1308
  }
1309
+ }
1573
1310
 
1574
- interface EvaluateParameterType {
1311
+ export namespace Console {
1312
+ /**
1313
+ * Console message.
1314
+ */
1315
+ export interface ConsoleMessage {
1575
1316
  /**
1576
- * Expression to evaluate.
1317
+ * Message source.
1577
1318
  */
1578
- expression: string;
1319
+ source: string;
1579
1320
  /**
1580
- * Symbolic group name that can be used to release multiple objects.
1321
+ * Message severity.
1581
1322
  */
1582
- objectGroup?: string;
1323
+ level: string;
1583
1324
  /**
1584
- * Determines whether Command Line API should be available during the evaluation.
1325
+ * Message text.
1585
1326
  */
1586
- includeCommandLineAPI?: boolean;
1327
+ text: string;
1587
1328
  /**
1588
- * In silent mode exceptions thrown during evaluation are not reported and do not pause
1589
- * execution. Overrides `setPauseOnException` state.
1329
+ * URL of the message origin.
1590
1330
  */
1591
- silent?: boolean;
1331
+ url?: string;
1592
1332
  /**
1593
- * Specifies in which execution context to perform evaluation. If the parameter is omitted the
1594
- * evaluation will be performed in the context of the inspected page.
1333
+ * Line number in the resource that generated this message (1-based).
1595
1334
  */
1596
- contextId?: ExecutionContextId;
1335
+ line?: number;
1597
1336
  /**
1598
- * Whether the result is expected to be a JSON object that should be sent by value.
1337
+ * Column number in the resource that generated this message (1-based).
1599
1338
  */
1600
- returnByValue?: boolean;
1339
+ column?: number;
1340
+ }
1341
+
1342
+ export interface MessageAddedEventDataType {
1601
1343
  /**
1602
- * Whether preview should be generated for the result.
1603
- * @experimental
1344
+ * Console message that has been added.
1604
1345
  */
1605
- generatePreview?: boolean;
1346
+ message: Console.ConsoleMessage;
1347
+ }
1348
+ }
1349
+
1350
+ export namespace Profiler {
1351
+ /**
1352
+ * Profile node. Holds callsite information, execution statistics and child nodes.
1353
+ */
1354
+ export interface ProfileNode {
1606
1355
  /**
1607
- * Whether execution should be treated as initiated by user in the UI.
1356
+ * Unique id of the node.
1608
1357
  */
1609
- userGesture?: boolean;
1358
+ id: number;
1610
1359
  /**
1611
- * Whether execution should `await` for resulting value and return once awaited promise is
1612
- * resolved.
1360
+ * Function location.
1613
1361
  */
1614
- awaitPromise?: boolean;
1362
+ callFrame: Runtime.CallFrame;
1615
1363
  /**
1616
- * Whether to throw an exception if side effect cannot be ruled out during evaluation.
1364
+ * Number of samples where this node was on top of the call stack.
1617
1365
  * @experimental
1618
1366
  */
1619
- throwOnSideEffect?: boolean;
1367
+ hitCount?: number;
1368
+ /**
1369
+ * Child node ids.
1370
+ */
1371
+ children?: number[];
1620
1372
  /**
1621
- * Terminate execution after timing out (number of milliseconds).
1373
+ * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
1374
+ */
1375
+ deoptReason?: string;
1376
+ /**
1377
+ * An array of source position ticks.
1622
1378
  * @experimental
1623
1379
  */
1624
- timeout?: TimeDelta;
1380
+ positionTicks?: Profiler.PositionTickInfo[];
1625
1381
  }
1626
1382
 
1627
- interface GetPropertiesParameterType {
1383
+ /**
1384
+ * Profile.
1385
+ */
1386
+ export interface Profile {
1628
1387
  /**
1629
- * Identifier of the object to return properties for.
1388
+ * The list of profile nodes. First item is the root node.
1630
1389
  */
1631
- objectId: RemoteObjectId;
1390
+ nodes: Profiler.ProfileNode[];
1632
1391
  /**
1633
- * If true, returns properties belonging only to the element itself, not to its prototype
1634
- * chain.
1392
+ * Profiling start timestamp in microseconds.
1635
1393
  */
1636
- ownProperties?: boolean;
1394
+ startTime: number;
1637
1395
  /**
1638
- * If true, returns accessor properties (with getter/setter) only; internal properties are not
1639
- * returned either.
1640
- * @experimental
1396
+ * Profiling end timestamp in microseconds.
1641
1397
  */
1642
- accessorPropertiesOnly?: boolean;
1398
+ endTime: number;
1643
1399
  /**
1644
- * Whether preview should be generated for the results.
1645
- * @experimental
1400
+ * Ids of samples top nodes.
1646
1401
  */
1647
- generatePreview?: boolean;
1648
- }
1649
-
1650
- interface GlobalLexicalScopeNamesParameterType {
1402
+ samples?: number[];
1651
1403
  /**
1652
- * Specifies in which execution context to lookup global scope variables.
1404
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
1653
1405
  */
1654
- executionContextId?: ExecutionContextId;
1406
+ timeDeltas?: number[];
1655
1407
  }
1656
1408
 
1657
- interface QueryObjectsParameterType {
1658
- /**
1659
- * Identifier of the prototype to return objects for.
1660
- */
1661
- prototypeObjectId: RemoteObjectId;
1409
+ /**
1410
+ * Specifies a number of samples attributed to a certain source position.
1411
+ * @experimental
1412
+ */
1413
+ export interface PositionTickInfo {
1662
1414
  /**
1663
- * Symbolic group name that can be used to release the results.
1415
+ * Source line number (1-based).
1664
1416
  */
1665
- objectGroup?: string;
1666
- }
1667
-
1668
- interface ReleaseObjectParameterType {
1417
+ line: number;
1669
1418
  /**
1670
- * Identifier of the object to release.
1419
+ * Number of samples attributed to the source line.
1671
1420
  */
1672
- objectId: RemoteObjectId;
1421
+ ticks: number;
1673
1422
  }
1674
1423
 
1675
- interface ReleaseObjectGroupParameterType {
1424
+ /**
1425
+ * Coverage data for a source range.
1426
+ * @experimental
1427
+ */
1428
+ export interface CoverageRange {
1676
1429
  /**
1677
- * Symbolic object group name.
1430
+ * JavaScript script source offset for the range start.
1678
1431
  */
1679
- objectGroup: string;
1680
- }
1681
-
1682
- interface RunScriptParameterType {
1432
+ startOffset: number;
1683
1433
  /**
1684
- * Id of the script to run.
1434
+ * JavaScript script source offset for the range end.
1685
1435
  */
1686
- scriptId: ScriptId;
1436
+ endOffset: number;
1687
1437
  /**
1688
- * Specifies in which execution context to perform script run. If the parameter is omitted the
1689
- * evaluation will be performed in the context of the inspected page.
1438
+ * Collected execution count of the source range.
1690
1439
  */
1691
- executionContextId?: ExecutionContextId;
1440
+ count: number;
1441
+ }
1442
+
1443
+ /**
1444
+ * Coverage data for a JavaScript function.
1445
+ * @experimental
1446
+ */
1447
+ export interface FunctionCoverage {
1692
1448
  /**
1693
- * Symbolic group name that can be used to release multiple objects.
1449
+ * JavaScript function name.
1694
1450
  */
1695
- objectGroup?: string;
1451
+ functionName: string;
1696
1452
  /**
1697
- * In silent mode exceptions thrown during evaluation are not reported and do not pause
1698
- * execution. Overrides `setPauseOnException` state.
1453
+ * Source ranges inside the function with coverage data.
1699
1454
  */
1700
- silent?: boolean;
1455
+ ranges: Profiler.CoverageRange[];
1701
1456
  /**
1702
- * Determines whether Command Line API should be available during the evaluation.
1457
+ * Whether coverage data for this function has block granularity.
1703
1458
  */
1704
- includeCommandLineAPI?: boolean;
1459
+ isBlockCoverage: boolean;
1460
+ }
1461
+
1462
+ /**
1463
+ * Coverage data for a JavaScript script.
1464
+ * @experimental
1465
+ */
1466
+ export interface ScriptCoverage {
1705
1467
  /**
1706
- * Whether the result is expected to be a JSON object which should be sent by value.
1468
+ * JavaScript script id.
1707
1469
  */
1708
- returnByValue?: boolean;
1470
+ scriptId: Runtime.ScriptId;
1709
1471
  /**
1710
- * Whether preview should be generated for the result.
1472
+ * JavaScript script name or url.
1711
1473
  */
1712
- generatePreview?: boolean;
1474
+ url: string;
1713
1475
  /**
1714
- * Whether execution should `await` for resulting value and return once awaited promise is
1715
- * resolved.
1476
+ * Functions contained in the script that has coverage data.
1716
1477
  */
1717
- awaitPromise?: boolean;
1478
+ functions: Profiler.FunctionCoverage[];
1718
1479
  }
1719
1480
 
1720
- interface SetCustomObjectFormatterEnabledParameterType {
1721
- enabled: boolean;
1481
+ export interface SetSamplingIntervalParameterType {
1482
+ /**
1483
+ * New sampling interval in microseconds.
1484
+ */
1485
+ interval: number;
1722
1486
  }
1723
1487
 
1724
- interface AwaitPromiseReturnType {
1488
+ export interface StartPreciseCoverageParameterType {
1725
1489
  /**
1726
- * Promise result. Will contain rejected value if promise was rejected.
1490
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
1727
1491
  */
1728
- result: RemoteObject;
1492
+ callCount?: boolean;
1729
1493
  /**
1730
- * Exception details if stack strace is available.
1494
+ * Collect block-based coverage.
1731
1495
  */
1732
- exceptionDetails?: ExceptionDetails;
1496
+ detailed?: boolean;
1733
1497
  }
1734
1498
 
1735
- interface CallFunctionOnReturnType {
1736
- /**
1737
- * Call result.
1738
- */
1739
- result: RemoteObject;
1499
+ export interface StopReturnType {
1740
1500
  /**
1741
- * Exception details.
1501
+ * Recorded profile.
1742
1502
  */
1743
- exceptionDetails?: ExceptionDetails;
1503
+ profile: Profiler.Profile;
1744
1504
  }
1745
1505
 
1746
- interface CompileScriptReturnType {
1506
+ export interface TakePreciseCoverageReturnType {
1747
1507
  /**
1748
- * Id of the script.
1508
+ * Coverage data for the current isolate.
1749
1509
  */
1750
- scriptId?: ScriptId;
1510
+ result: Profiler.ScriptCoverage[];
1511
+ }
1512
+
1513
+ export interface GetBestEffortCoverageReturnType {
1751
1514
  /**
1752
- * Exception details.
1515
+ * Coverage data for the current isolate.
1753
1516
  */
1754
- exceptionDetails?: ExceptionDetails;
1517
+ result: Profiler.ScriptCoverage[];
1755
1518
  }
1756
1519
 
1757
- interface EvaluateReturnType {
1520
+ export interface ConsoleProfileStartedEventDataType {
1521
+ id: string;
1758
1522
  /**
1759
- * Evaluation result.
1523
+ * Location of console.profile().
1760
1524
  */
1761
- result: RemoteObject;
1525
+ location: Debugger.Location;
1762
1526
  /**
1763
- * Exception details.
1527
+ * Profile title passed as an argument to console.profile().
1764
1528
  */
1765
- exceptionDetails?: ExceptionDetails;
1529
+ title?: string;
1766
1530
  }
1767
1531
 
1768
- interface GetIsolateIdReturnType {
1769
- /**
1770
- * The isolate id.
1771
- */
1532
+ export interface ConsoleProfileFinishedEventDataType {
1772
1533
  id: string;
1773
- }
1774
-
1775
- interface GetHeapUsageReturnType {
1776
1534
  /**
1777
- * Used heap size in bytes.
1535
+ * Location of console.profileEnd().
1778
1536
  */
1779
- usedSize: number;
1537
+ location: Debugger.Location;
1538
+ profile: Profiler.Profile;
1780
1539
  /**
1781
- * Allocated heap size in bytes.
1540
+ * Profile title passed as an argument to console.profile().
1782
1541
  */
1783
- totalSize: number;
1542
+ title?: string;
1784
1543
  }
1544
+ }
1545
+
1546
+ export namespace HeapProfiler {
1547
+ /**
1548
+ * Heap snapshot object id.
1549
+ */
1550
+ export type HeapSnapshotObjectId = string;
1785
1551
 
1786
- interface GetPropertiesReturnType {
1552
+ /**
1553
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
1554
+ */
1555
+ export interface SamplingHeapProfileNode {
1787
1556
  /**
1788
- * Object properties.
1557
+ * Function location.
1789
1558
  */
1790
- result: PropertyDescriptor[];
1559
+ callFrame: Runtime.CallFrame;
1791
1560
  /**
1792
- * Internal object properties (only of the element itself).
1561
+ * Allocations size in bytes for the node excluding children.
1793
1562
  */
1794
- internalProperties?: InternalPropertyDescriptor[];
1563
+ selfSize: number;
1795
1564
  /**
1796
- * Exception details.
1565
+ * Child nodes.
1797
1566
  */
1798
- exceptionDetails?: ExceptionDetails;
1567
+ children: HeapProfiler.SamplingHeapProfileNode[];
1799
1568
  }
1800
1569
 
1801
- interface GlobalLexicalScopeNamesReturnType {
1802
- names: string[];
1570
+ /**
1571
+ * Profile.
1572
+ */
1573
+ export interface SamplingHeapProfile {
1574
+ head: HeapProfiler.SamplingHeapProfileNode;
1803
1575
  }
1804
1576
 
1805
- interface QueryObjectsReturnType {
1806
- /**
1807
- * Array with objects.
1808
- */
1809
- objects: RemoteObject;
1577
+ export interface StartTrackingHeapObjectsParameterType {
1578
+ trackAllocations?: boolean;
1810
1579
  }
1811
1580
 
1812
- interface RunScriptReturnType {
1813
- /**
1814
- * Run result.
1815
- */
1816
- result: RemoteObject;
1581
+ export interface StopTrackingHeapObjectsParameterType {
1817
1582
  /**
1818
- * Exception details.
1583
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
1819
1584
  */
1820
- exceptionDetails?: ExceptionDetails;
1585
+ reportProgress?: boolean;
1821
1586
  }
1822
1587
 
1823
- interface ConsoleAPICalledEventDataType {
1824
- /**
1825
- * Type of the call.
1826
- */
1827
- type: string;
1828
- /**
1829
- * Call arguments.
1830
- */
1831
- args: RemoteObject[];
1832
- /**
1833
- * Identifier of the context where the call was made.
1834
- */
1835
- executionContextId: ExecutionContextId;
1588
+ export interface TakeHeapSnapshotParameterType {
1836
1589
  /**
1837
- * Call timestamp.
1590
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
1838
1591
  */
1839
- timestamp: Timestamp;
1592
+ reportProgress?: boolean;
1593
+ }
1594
+
1595
+ export interface GetObjectByHeapObjectIdParameterType {
1596
+ objectId: HeapProfiler.HeapSnapshotObjectId;
1840
1597
  /**
1841
- * Stack trace captured when the call was made.
1598
+ * Symbolic group name that can be used to release multiple objects.
1842
1599
  */
1843
- stackTrace?: StackTrace;
1600
+ objectGroup?: string;
1601
+ }
1602
+
1603
+ export interface AddInspectedHeapObjectParameterType {
1844
1604
  /**
1845
- * Console context descriptor for calls on non-default console context (not console.*):
1846
- * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
1847
- * on named context.
1848
- * @experimental
1605
+ * Heap snapshot object id to be accessible by means of $x command line API.
1849
1606
  */
1850
- context?: string;
1607
+ heapObjectId: HeapProfiler.HeapSnapshotObjectId;
1851
1608
  }
1852
1609
 
1853
- interface ExceptionRevokedEventDataType {
1610
+ export interface GetHeapObjectIdParameterType {
1854
1611
  /**
1855
- * Reason describing why exception was revoked.
1612
+ * Identifier of the object to get heap object id for.
1856
1613
  */
1857
- reason: string;
1614
+ objectId: Runtime.RemoteObjectId;
1615
+ }
1616
+
1617
+ export interface StartSamplingParameterType {
1858
1618
  /**
1859
- * The id of revoked exception, as reported in `exceptionThrown`.
1619
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
1860
1620
  */
1861
- exceptionId: number;
1621
+ samplingInterval?: number;
1862
1622
  }
1863
1623
 
1864
- interface ExceptionThrownEventDataType {
1624
+ export interface GetObjectByHeapObjectIdReturnType {
1865
1625
  /**
1866
- * Timestamp of the exception.
1626
+ * Evaluation result.
1867
1627
  */
1868
- timestamp: Timestamp;
1869
- exceptionDetails: ExceptionDetails;
1628
+ result: Runtime.RemoteObject;
1870
1629
  }
1871
1630
 
1872
- interface ExecutionContextCreatedEventDataType {
1631
+ export interface GetHeapObjectIdReturnType {
1873
1632
  /**
1874
- * A newly created execution context.
1633
+ * Id of the heap snapshot object corresponding to the passed remote object id.
1875
1634
  */
1876
- context: ExecutionContextDescription;
1635
+ heapSnapshotObjectId: HeapProfiler.HeapSnapshotObjectId;
1877
1636
  }
1878
1637
 
1879
- interface ExecutionContextDestroyedEventDataType {
1638
+ export interface StopSamplingReturnType {
1880
1639
  /**
1881
- * Id of the destroyed context
1640
+ * Recorded sampling heap profile.
1882
1641
  */
1883
- executionContextId: ExecutionContextId;
1642
+ profile: HeapProfiler.SamplingHeapProfile;
1884
1643
  }
1885
1644
 
1886
- interface InspectRequestedEventDataType {
1887
- object: RemoteObject;
1888
- hints: {};
1645
+ export interface AddHeapSnapshotChunkEventDataType {
1646
+ chunk: string;
1889
1647
  }
1890
- }
1891
1648
 
1892
- namespace Schema {
1893
- /**
1894
- * Description of the protocol domain.
1895
- */
1896
- interface Domain {
1897
- /**
1898
- * Domain name.
1899
- */
1900
- name: string;
1901
- /**
1902
- * Domain version.
1903
- */
1904
- version: string;
1649
+ export interface ReportHeapSnapshotProgressEventDataType {
1650
+ done: number;
1651
+ total: number;
1652
+ finished?: boolean;
1653
+ }
1654
+
1655
+ export interface LastSeenObjectIdEventDataType {
1656
+ lastSeenObjectId: number;
1657
+ timestamp: number;
1905
1658
  }
1906
1659
 
1907
- interface GetDomainsReturnType {
1660
+ export interface HeapStatsUpdateEventDataType {
1908
1661
  /**
1909
- * List of supported domains.
1662
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
1910
1663
  */
1911
- domains: Domain[];
1664
+ statsUpdate: number[];
1912
1665
  }
1913
1666
  }
1914
1667
 
1915
1668
  /**
1916
1669
  * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
1917
1670
  */
1918
- class Session extends EventEmitter {
1671
+ export class Session extends EventEmitter {
1919
1672
  /**
1920
- * Create a new instance of the inspector.Session class.
1921
- * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
1673
+ * Create a new instance of the inspector.Session class. The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
1922
1674
  */
1923
1675
  constructor();
1924
1676
 
1925
1677
  /**
1926
- * Connects a session to the inspector back-end.
1927
- * An exception will be thrown if there is already a connected session established either
1928
- * through the API or by a front-end connected to the Inspector WebSocket port.
1678
+ * Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port.
1929
1679
  */
1930
1680
  connect(): void;
1931
1681
 
1932
1682
  /**
1933
- * Immediately close the session. All pending message callbacks will be called with an error.
1934
- * session.connect() will need to be called to be able to send messages again.
1935
- * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
1683
+ * Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
1936
1684
  */
1937
1685
  disconnect(): void;
1938
1686
 
1939
1687
  /**
1940
- * Posts a message to the inspector back-end. callback will be notified when a response is received.
1941
- * callback is a function that accepts two optional arguments - error and message-specific result.
1688
+ * Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result.
1942
1689
  */
1943
1690
  post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
1944
1691
  post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
1945
1692
 
1946
1693
  /**
1947
- * Does nothing.
1948
- */
1949
- post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
1950
-
1951
- /**
1952
- * Disables console domain, prevents further console messages from being reported to the client.
1953
- */
1954
- post(method: "Console.disable", callback?: (err: Error | null) => void): void;
1955
-
1956
- /**
1957
- * Enables console domain, sends the messages collected so far to the client by means of the
1958
- * `messageAdded` notification.
1959
- */
1960
- post(method: "Console.enable", callback?: (err: Error | null) => void): void;
1961
- /**
1962
- * Continues execution until specific location is reached.
1963
- */
1964
- post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
1965
- post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
1966
-
1967
- /**
1968
- * Disables debugger for given page.
1694
+ * Returns supported domains.
1969
1695
  */
1970
- post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
1971
-
1696
+ post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
1972
1697
  /**
1973
- * Enables debugger for the given page. Clients should not assume that the debugging has been
1974
- * enabled until the result for this command is received.
1698
+ * Evaluates expression on global object.
1975
1699
  */
1976
- post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
1700
+ post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1701
+ post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1977
1702
 
1978
1703
  /**
1979
- * Evaluates expression on a given call frame.
1704
+ * Add handler to promise with given promise object id.
1980
1705
  */
1981
- post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
1982
- post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
1706
+ post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1707
+ post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1983
1708
 
1984
1709
  /**
1985
- * Returns possible locations for breakpoint. scriptId in start and end range locations should be
1986
- * the same.
1710
+ * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
1987
1711
  */
1988
- post(
1989
- method: "Debugger.getPossibleBreakpoints",
1990
- params?: Debugger.GetPossibleBreakpointsParameterType,
1991
- callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
1992
- ): void;
1993
- post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
1712
+ post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1713
+ post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1994
1714
 
1995
1715
  /**
1996
- * Returns source for the script with given id.
1716
+ * Returns properties of a given object. Object group of the result is inherited from the target object.
1997
1717
  */
1998
- post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
1999
- post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
1718
+ post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
1719
+ post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
2000
1720
 
2001
1721
  /**
2002
- * Returns stack trace with given `stackTraceId`.
2003
- * @experimental
1722
+ * Releases remote object with given id.
2004
1723
  */
2005
- post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
2006
- post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
1724
+ post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
1725
+ post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
2007
1726
 
2008
1727
  /**
2009
- * Stops on the next JavaScript statement.
1728
+ * Releases all remote objects that belong to a given group.
2010
1729
  */
2011
- post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
1730
+ post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
1731
+ post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
2012
1732
 
2013
1733
  /**
2014
- * @experimental
1734
+ * Tells inspected instance to run if it was waiting for debugger to attach.
2015
1735
  */
2016
- post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
2017
- post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
1736
+ post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
2018
1737
 
2019
1738
  /**
2020
- * Removes JavaScript breakpoint.
1739
+ * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
2021
1740
  */
2022
- post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
2023
- post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
1741
+ post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
2024
1742
 
2025
1743
  /**
2026
- * Restarts particular call frame from the beginning.
1744
+ * Disables reporting of execution contexts creation.
2027
1745
  */
2028
- post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
2029
- post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
1746
+ post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
2030
1747
 
2031
1748
  /**
2032
- * Resumes JavaScript execution.
1749
+ * Discards collected exceptions and console API calls.
2033
1750
  */
2034
- post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
1751
+ post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
2035
1752
 
2036
1753
  /**
2037
- * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and
2038
- * Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled
2039
- * before next pause. Returns success when async task is actually scheduled, returns error if no
2040
- * task were scheduled or another scheduleStepIntoAsync was called.
2041
1754
  * @experimental
2042
1755
  */
2043
- post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
2044
-
2045
- /**
2046
- * Searches for given string in script content.
2047
- */
2048
- post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
2049
- post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
1756
+ post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
1757
+ post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
2050
1758
 
2051
1759
  /**
2052
- * Enables or disables async call stacks tracking.
1760
+ * Compiles expression.
2053
1761
  */
2054
- post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
2055
- post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
1762
+ post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
1763
+ post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
2056
1764
 
2057
1765
  /**
2058
- * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
2059
- * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
2060
- * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
2061
- * @experimental
1766
+ * Runs script with given id in a given context.
2062
1767
  */
2063
- post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
2064
- post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
1768
+ post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
1769
+ post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
2065
1770
 
2066
1771
  /**
2067
- * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
2068
- * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
2069
- * Positions array contains positions where blackbox state is changed. First interval isn't
2070
- * blackboxed. Array should be sorted.
2071
1772
  * @experimental
2072
1773
  */
2073
- post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
2074
- post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
2075
-
2076
- /**
2077
- * Sets JavaScript breakpoint at a given location.
2078
- */
2079
- post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
2080
- post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
2081
-
1774
+ post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
1775
+ post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
2082
1776
  /**
2083
- * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
2084
- * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
2085
- * `locations` property. Further matching script parsing will result in subsequent
2086
- * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
1777
+ * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
2087
1778
  */
2088
- post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
2089
- post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
1779
+ post(method: "Debugger.enable", callback?: (err: Error | null) => void): void;
2090
1780
 
2091
1781
  /**
2092
- * Sets JavaScript breakpoint before each call to the given function.
2093
- * If another function was created from the same source as a given one,
2094
- * calling it will also trigger the breakpoint.
2095
- * @experimental
1782
+ * Disables debugger for given page.
2096
1783
  */
2097
- post(
2098
- method: "Debugger.setBreakpointOnFunctionCall",
2099
- params?: Debugger.SetBreakpointOnFunctionCallParameterType,
2100
- callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void
2101
- ): void;
2102
- post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void): void;
1784
+ post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
2103
1785
 
2104
1786
  /**
2105
1787
  * Activates / deactivates all breakpoints on the page.
@@ -2107,26 +1789,6 @@ declare module "inspector" {
2107
1789
  post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
2108
1790
  post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
2109
1791
 
2110
- /**
2111
- * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
2112
- * no exceptions. Initial pause on exceptions state is `none`.
2113
- */
2114
- post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
2115
- post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
2116
-
2117
- /**
2118
- * Changes return value in top frame. Available only at return break position.
2119
- * @experimental
2120
- */
2121
- post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
2122
- post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
2123
-
2124
- /**
2125
- * Edits JavaScript source live.
2126
- */
2127
- post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
2128
- post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
2129
-
2130
1792
  /**
2131
1793
  * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
2132
1794
  */
@@ -2134,236 +1796,212 @@ declare module "inspector" {
2134
1796
  post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
2135
1797
 
2136
1798
  /**
2137
- * Changes value of variable in a callframe. Object-based scopes are not supported and must be
2138
- * mutated manually.
1799
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
2139
1800
  */
2140
- post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
2141
- post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
1801
+ post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
1802
+ post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
2142
1803
 
2143
1804
  /**
2144
- * Steps into the function call.
1805
+ * Sets JavaScript breakpoint at a given location.
2145
1806
  */
2146
- post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
2147
- post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
1807
+ post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
1808
+ post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
2148
1809
 
2149
1810
  /**
2150
- * Steps out of the function call.
1811
+ * Removes JavaScript breakpoint.
2151
1812
  */
2152
- post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
1813
+ post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
1814
+ post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
2153
1815
 
2154
1816
  /**
2155
- * Steps over the statement.
2156
- */
2157
- post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
2158
- /**
2159
- * Enables console to refer to the node with given id via $x (see Command Line API for more details
2160
- * $x functions).
1817
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
1818
+ * @experimental
2161
1819
  */
2162
- post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
2163
- post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
2164
-
2165
- post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
2166
-
2167
- post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
2168
-
2169
- post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
2170
-
2171
- post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2172
- post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2173
-
2174
- post(
2175
- method: "HeapProfiler.getObjectByHeapObjectId",
2176
- params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
2177
- callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
2178
- ): void;
2179
- post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
2180
-
2181
- post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
2182
-
2183
- post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
2184
- post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
2185
-
2186
- post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
2187
- post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
2188
-
2189
- post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
2190
-
2191
- post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
2192
- post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
2193
-
2194
- post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
2195
- post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
2196
- post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
2197
-
2198
- post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
1820
+ post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType, callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
1821
+ post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
2199
1822
 
2200
1823
  /**
2201
- * Collect coverage data for the current isolate. The coverage data may be incomplete due to
2202
- * garbage collection.
1824
+ * Continues execution until specific location is reached.
2203
1825
  */
2204
- post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
1826
+ post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
1827
+ post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
2205
1828
 
2206
1829
  /**
2207
- * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
2208
- */
2209
- post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
2210
- post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
2211
-
2212
- post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
1830
+ * Steps over the statement.
1831
+ */
1832
+ post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
2213
1833
 
2214
1834
  /**
2215
- * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
2216
- * coverage may be incomplete. Enabling prevents running optimized code and resets execution
2217
- * counters.
1835
+ * Steps into the function call.
2218
1836
  */
2219
- post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
2220
- post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
1837
+ post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
2221
1838
 
2222
1839
  /**
2223
- * Enable type profile.
2224
- * @experimental
1840
+ * Steps out of the function call.
2225
1841
  */
2226
- post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void;
2227
-
2228
- post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
1842
+ post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
2229
1843
 
2230
1844
  /**
2231
- * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
2232
- * executing optimized code.
1845
+ * Stops on the next JavaScript statement.
2233
1846
  */
2234
- post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
1847
+ post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
2235
1848
 
2236
1849
  /**
2237
- * Disable type profile. Disabling releases type profile data collected so far.
1850
+ * Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
2238
1851
  * @experimental
2239
1852
  */
2240
- post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void;
1853
+ post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
2241
1854
 
2242
1855
  /**
2243
- * Collect coverage data for the current isolate, and resets execution counters. Precise code
2244
- * coverage needs to have started.
1856
+ * Resumes JavaScript execution.
2245
1857
  */
2246
- post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
1858
+ post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
2247
1859
 
2248
1860
  /**
2249
- * Collect type profile.
1861
+ * Searches for given string in script content.
2250
1862
  * @experimental
2251
1863
  */
2252
- post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
1864
+ post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
1865
+ post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
1866
+
2253
1867
  /**
2254
- * Add handler to promise with given promise object id.
1868
+ * Edits JavaScript source live.
2255
1869
  */
2256
- post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
2257
- post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1870
+ post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
1871
+ post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
2258
1872
 
2259
1873
  /**
2260
- * Calls function with given declaration on the given object. Object group of the result is
2261
- * inherited from the target object.
1874
+ * Restarts particular call frame from the beginning.
2262
1875
  */
2263
- post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
2264
- post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1876
+ post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
1877
+ post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
2265
1878
 
2266
1879
  /**
2267
- * Compiles expression.
1880
+ * Returns source for the script with given id.
2268
1881
  */
2269
- post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
2270
- post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
1882
+ post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
1883
+ post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
2271
1884
 
2272
1885
  /**
2273
- * Disables reporting of execution contexts creation.
1886
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
2274
1887
  */
2275
- post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
1888
+ post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
1889
+ post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
2276
1890
 
2277
1891
  /**
2278
- * Discards collected exceptions and console API calls.
1892
+ * Evaluates expression on a given call frame.
2279
1893
  */
2280
- post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
1894
+ post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
1895
+ post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
2281
1896
 
2282
1897
  /**
2283
- * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
2284
- * When the reporting gets enabled the event will be sent immediately for each existing execution
2285
- * context.
1898
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
2286
1899
  */
2287
- post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
1900
+ post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
1901
+ post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
2288
1902
 
2289
1903
  /**
2290
- * Evaluates expression on global object.
1904
+ * Enables or disables async call stacks tracking.
2291
1905
  */
2292
- post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
2293
- post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1906
+ post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
1907
+ post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
2294
1908
 
2295
1909
  /**
2296
- * Returns the isolate id.
1910
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
2297
1911
  * @experimental
2298
1912
  */
2299
- post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void;
1913
+ post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
1914
+ post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
2300
1915
 
2301
1916
  /**
2302
- * Returns the JavaScript heap usage.
2303
- * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
1917
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
2304
1918
  * @experimental
2305
1919
  */
2306
- post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => void): void;
2307
-
1920
+ post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
1921
+ post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
2308
1922
  /**
2309
- * Returns properties of a given object. Object group of the result is inherited from the target
2310
- * object.
1923
+ * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
2311
1924
  */
2312
- post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
2313
- post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
1925
+ post(method: "Console.enable", callback?: (err: Error | null) => void): void;
2314
1926
 
2315
1927
  /**
2316
- * Returns all let, const and class variables from global scope.
1928
+ * Disables console domain, prevents further console messages from being reported to the client.
2317
1929
  */
2318
- post(
2319
- method: "Runtime.globalLexicalScopeNames",
2320
- params?: Runtime.GlobalLexicalScopeNamesParameterType,
2321
- callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
2322
- ): void;
2323
- post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
2324
-
2325
- post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
2326
- post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
1930
+ post(method: "Console.disable", callback?: (err: Error | null) => void): void;
2327
1931
 
2328
1932
  /**
2329
- * Releases remote object with given id.
1933
+ * Does nothing.
2330
1934
  */
2331
- post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
2332
- post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
1935
+ post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
1936
+ post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
1937
+
1938
+ post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
2333
1939
 
2334
1940
  /**
2335
- * Releases all remote objects that belong to a given group.
1941
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
2336
1942
  */
2337
- post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
2338
- post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
1943
+ post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
1944
+ post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
1945
+
1946
+ post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
1947
+
1948
+ post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
2339
1949
 
2340
1950
  /**
2341
- * Tells inspected instance to run if it was waiting for debugger to attach.
1951
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
1952
+ * @experimental
2342
1953
  */
2343
- post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
1954
+ post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
1955
+ post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
2344
1956
 
2345
1957
  /**
2346
- * Runs script with given id in a given context.
1958
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
1959
+ * @experimental
2347
1960
  */
2348
- post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
2349
- post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
1961
+ post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
2350
1962
 
2351
1963
  /**
1964
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
2352
1965
  * @experimental
2353
1966
  */
2354
- post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
2355
- post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
1967
+ post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
2356
1968
 
2357
1969
  /**
2358
- * Terminate current or next JavaScript execution.
2359
- * Will cancel the termination when the outer-most script execution ends.
1970
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
2360
1971
  * @experimental
2361
1972
  */
2362
- post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void;
1973
+ post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
1974
+ post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
1975
+
1976
+ post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
1977
+
1978
+ post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
1979
+ post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
1980
+
1981
+ post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
1982
+ post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
1983
+
1984
+ post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
1985
+ post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
1986
+
1987
+ post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
1988
+
1989
+ post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
1990
+ post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
1991
+
2363
1992
  /**
2364
- * Returns supported domains.
1993
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
2365
1994
  */
2366
- post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
1995
+ post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
1996
+ post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
1997
+
1998
+ post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
1999
+ post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2000
+
2001
+ post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
2002
+ post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
2003
+
2004
+ post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
2367
2005
 
2368
2006
  // Events
2369
2007
 
@@ -2375,129 +2013,164 @@ declare module "inspector" {
2375
2013
  addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2376
2014
 
2377
2015
  /**
2378
- * Issued when new console message is added.
2016
+ * Issued when new execution context is created.
2379
2017
  */
2380
- addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2018
+ addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2381
2019
 
2382
2020
  /**
2383
- * Fired when breakpoint is resolved to an actual script and location.
2021
+ * Issued when execution context is destroyed.
2384
2022
  */
2385
- addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2023
+ addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2386
2024
 
2387
2025
  /**
2388
- * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2026
+ * Issued when all executionContexts were cleared in browser
2389
2027
  */
2390
- addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2028
+ addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2391
2029
 
2392
2030
  /**
2393
- * Fired when the virtual machine resumed execution.
2031
+ * Issued when exception was thrown and unhandled.
2394
2032
  */
2395
- addListener(event: "Debugger.resumed", listener: () => void): this;
2033
+ addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2396
2034
 
2397
2035
  /**
2398
- * Fired when virtual machine fails to parse the script.
2036
+ * Issued when unhandled exception was revoked.
2399
2037
  */
2400
- addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2038
+ addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2401
2039
 
2402
2040
  /**
2403
- * Fired when virtual machine parses script. This event is also fired for all known and uncollected
2404
- * scripts upon enabling debugger.
2041
+ * Issued when console API was called.
2405
2042
  */
2406
- addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2407
-
2408
- addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2043
+ addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2409
2044
 
2410
2045
  /**
2411
- * If heap objects tracking has been started then backend may send update for one or more fragments
2046
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2412
2047
  */
2413
- addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2048
+ addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2414
2049
 
2415
2050
  /**
2416
- * If heap objects tracking has been started then backend regularly sends a current value for last
2417
- * seen object id and corresponding timestamp. If the were changes in the heap since last event
2418
- * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2051
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2419
2052
  */
2420
- addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2421
-
2422
- addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2423
- addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2424
- addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2053
+ addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2425
2054
 
2426
2055
  /**
2427
- * Sent when new profile recording is started using console.profile() call.
2056
+ * Fired when virtual machine fails to parse the script.
2428
2057
  */
2429
- addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2058
+ addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2430
2059
 
2431
2060
  /**
2432
- * Issued when console API was called.
2061
+ * Fired when breakpoint is resolved to an actual script and location.
2433
2062
  */
2434
- addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2063
+ addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2435
2064
 
2436
2065
  /**
2437
- * Issued when unhandled exception was revoked.
2066
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2438
2067
  */
2439
- addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2068
+ addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2440
2069
 
2441
2070
  /**
2442
- * Issued when exception was thrown and unhandled.
2071
+ * Fired when the virtual machine resumed execution.
2443
2072
  */
2444
- addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2073
+ addListener(event: "Debugger.resumed", listener: () => void): this;
2445
2074
 
2446
2075
  /**
2447
- * Issued when new execution context is created.
2076
+ * Issued when new console message is added.
2448
2077
  */
2449
- addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2078
+ addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2450
2079
 
2451
2080
  /**
2452
- * Issued when execution context is destroyed.
2081
+ * Sent when new profile recording is started using console.profile() call.
2453
2082
  */
2454
- addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2083
+ addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2084
+
2085
+ addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2086
+ addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2087
+ addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2088
+ addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2455
2089
 
2456
2090
  /**
2457
- * Issued when all executionContexts were cleared in browser
2091
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2458
2092
  */
2459
- addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2093
+ addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2460
2094
 
2461
2095
  /**
2462
- * Issued when object should be inspected (for example, as a result of inspect() command line API
2463
- * call).
2096
+ * If heap objects tracking has been started then backend may send update for one or more fragments
2464
2097
  */
2465
- addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2098
+ addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2466
2099
 
2467
2100
  emit(event: string | symbol, ...args: any[]): boolean;
2468
2101
  emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
2469
- emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
2102
+ emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
2103
+ emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
2104
+ emit(event: "Runtime.executionContextsCleared"): boolean;
2105
+ emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
2106
+ emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
2107
+ emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
2108
+ emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
2109
+ emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
2110
+ emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
2470
2111
  emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
2471
2112
  emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
2472
2113
  emit(event: "Debugger.resumed"): boolean;
2473
- emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
2474
- emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
2114
+ emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
2115
+ emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
2116
+ emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
2475
2117
  emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
2476
- emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
2477
- emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
2478
- emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
2479
2118
  emit(event: "HeapProfiler.resetProfiles"): boolean;
2480
- emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
2481
- emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
2482
- emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
2483
- emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
2484
- emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
2485
- emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
2486
- emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
2487
- emit(event: "Runtime.executionContextsCleared"): boolean;
2488
- emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
2119
+ emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
2120
+ emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
2121
+ emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
2122
+
2123
+ on(event: string, listener: (...args: any[]) => void): this;
2124
+
2125
+ /**
2126
+ * Emitted when any notification from the V8 Inspector is received.
2127
+ */
2128
+ on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2129
+
2130
+ /**
2131
+ * Issued when new execution context is created.
2132
+ */
2133
+ on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2134
+
2135
+ /**
2136
+ * Issued when execution context is destroyed.
2137
+ */
2138
+ on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2139
+
2140
+ /**
2141
+ * Issued when all executionContexts were cleared in browser
2142
+ */
2143
+ on(event: "Runtime.executionContextsCleared", listener: () => void): this;
2144
+
2145
+ /**
2146
+ * Issued when exception was thrown and unhandled.
2147
+ */
2148
+ on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2489
2149
 
2490
- on(event: string, listener: (...args: any[]) => void): this;
2150
+ /**
2151
+ * Issued when unhandled exception was revoked.
2152
+ */
2153
+ on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2491
2154
 
2492
2155
  /**
2493
- * Emitted when any notification from the V8 Inspector is received.
2156
+ * Issued when console API was called.
2494
2157
  */
2495
- on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2158
+ on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2496
2159
 
2497
2160
  /**
2498
- * Issued when new console message is added.
2161
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2499
2162
  */
2500
- on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2163
+ on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2164
+
2165
+ /**
2166
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2167
+ */
2168
+ on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2169
+
2170
+ /**
2171
+ * Fired when virtual machine fails to parse the script.
2172
+ */
2173
+ on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2501
2174
 
2502
2175
  /**
2503
2176
  * Fired when breakpoint is resolved to an actual script and location.
@@ -2515,86 +2188,81 @@ declare module "inspector" {
2515
2188
  on(event: "Debugger.resumed", listener: () => void): this;
2516
2189
 
2517
2190
  /**
2518
- * Fired when virtual machine fails to parse the script.
2191
+ * Issued when new console message is added.
2519
2192
  */
2520
- on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2193
+ on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2521
2194
 
2522
2195
  /**
2523
- * Fired when virtual machine parses script. This event is also fired for all known and uncollected
2524
- * scripts upon enabling debugger.
2196
+ * Sent when new profile recording is started using console.profile() call.
2525
2197
  */
2526
- on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2198
+ on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2527
2199
 
2200
+ on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2528
2201
  on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2202
+ on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2203
+ on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2529
2204
 
2530
2205
  /**
2531
- * If heap objects tracking has been started then backend may send update for one or more fragments
2206
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2532
2207
  */
2533
- on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2208
+ on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2534
2209
 
2535
2210
  /**
2536
- * If heap objects tracking has been started then backend regularly sends a current value for last
2537
- * seen object id and corresponding timestamp. If the were changes in the heap since last event
2538
- * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2211
+ * If heap objects tracking has been started then backend may send update for one or more fragments
2539
2212
  */
2540
- on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2213
+ on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2541
2214
 
2542
- on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2543
- on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2544
- on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2215
+ once(event: string, listener: (...args: any[]) => void): this;
2545
2216
 
2546
2217
  /**
2547
- * Sent when new profile recording is started using console.profile() call.
2218
+ * Emitted when any notification from the V8 Inspector is received.
2548
2219
  */
2549
- on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2220
+ once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2550
2221
 
2551
2222
  /**
2552
- * Issued when console API was called.
2223
+ * Issued when new execution context is created.
2553
2224
  */
2554
- on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2225
+ once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2555
2226
 
2556
2227
  /**
2557
- * Issued when unhandled exception was revoked.
2228
+ * Issued when execution context is destroyed.
2558
2229
  */
2559
- on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2230
+ once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2560
2231
 
2561
2232
  /**
2562
- * Issued when exception was thrown and unhandled.
2233
+ * Issued when all executionContexts were cleared in browser
2563
2234
  */
2564
- on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2235
+ once(event: "Runtime.executionContextsCleared", listener: () => void): this;
2565
2236
 
2566
2237
  /**
2567
- * Issued when new execution context is created.
2238
+ * Issued when exception was thrown and unhandled.
2568
2239
  */
2569
- on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2240
+ once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2570
2241
 
2571
2242
  /**
2572
- * Issued when execution context is destroyed.
2243
+ * Issued when unhandled exception was revoked.
2573
2244
  */
2574
- on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2245
+ once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2575
2246
 
2576
2247
  /**
2577
- * Issued when all executionContexts were cleared in browser
2248
+ * Issued when console API was called.
2578
2249
  */
2579
- on(event: "Runtime.executionContextsCleared", listener: () => void): this;
2250
+ once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2580
2251
 
2581
2252
  /**
2582
- * Issued when object should be inspected (for example, as a result of inspect() command line API
2583
- * call).
2253
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2584
2254
  */
2585
- on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2586
-
2587
- once(event: string, listener: (...args: any[]) => void): this;
2255
+ once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2588
2256
 
2589
2257
  /**
2590
- * Emitted when any notification from the V8 Inspector is received.
2258
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2591
2259
  */
2592
- once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2260
+ once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2593
2261
 
2594
2262
  /**
2595
- * Issued when new console message is added.
2263
+ * Fired when virtual machine fails to parse the script.
2596
2264
  */
2597
- once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2265
+ once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2598
2266
 
2599
2267
  /**
2600
2268
  * Fired when breakpoint is resolved to an actual script and location.
@@ -2612,86 +2280,81 @@ declare module "inspector" {
2612
2280
  once(event: "Debugger.resumed", listener: () => void): this;
2613
2281
 
2614
2282
  /**
2615
- * Fired when virtual machine fails to parse the script.
2283
+ * Issued when new console message is added.
2616
2284
  */
2617
- once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2285
+ once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2618
2286
 
2619
2287
  /**
2620
- * Fired when virtual machine parses script. This event is also fired for all known and uncollected
2621
- * scripts upon enabling debugger.
2288
+ * Sent when new profile recording is started using console.profile() call.
2622
2289
  */
2623
- once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2290
+ once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2624
2291
 
2292
+ once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2625
2293
  once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2294
+ once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2295
+ once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2626
2296
 
2627
2297
  /**
2628
- * If heap objects tracking has been started then backend may send update for one or more fragments
2298
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2629
2299
  */
2630
- once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2300
+ once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2631
2301
 
2632
2302
  /**
2633
- * If heap objects tracking has been started then backend regularly sends a current value for last
2634
- * seen object id and corresponding timestamp. If the were changes in the heap since last event
2635
- * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2303
+ * If heap objects tracking has been started then backend may send update for one or more fragments
2636
2304
  */
2637
- once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2305
+ once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2638
2306
 
2639
- once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2640
- once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2641
- once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2307
+ prependListener(event: string, listener: (...args: any[]) => void): this;
2642
2308
 
2643
2309
  /**
2644
- * Sent when new profile recording is started using console.profile() call.
2310
+ * Emitted when any notification from the V8 Inspector is received.
2645
2311
  */
2646
- once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2312
+ prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2647
2313
 
2648
2314
  /**
2649
- * Issued when console API was called.
2315
+ * Issued when new execution context is created.
2650
2316
  */
2651
- once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2317
+ prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2652
2318
 
2653
2319
  /**
2654
- * Issued when unhandled exception was revoked.
2320
+ * Issued when execution context is destroyed.
2655
2321
  */
2656
- once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2322
+ prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2657
2323
 
2658
2324
  /**
2659
- * Issued when exception was thrown and unhandled.
2325
+ * Issued when all executionContexts were cleared in browser
2660
2326
  */
2661
- once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2327
+ prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2662
2328
 
2663
2329
  /**
2664
- * Issued when new execution context is created.
2330
+ * Issued when exception was thrown and unhandled.
2665
2331
  */
2666
- once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2332
+ prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2667
2333
 
2668
2334
  /**
2669
- * Issued when execution context is destroyed.
2335
+ * Issued when unhandled exception was revoked.
2670
2336
  */
2671
- once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2337
+ prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2672
2338
 
2673
2339
  /**
2674
- * Issued when all executionContexts were cleared in browser
2340
+ * Issued when console API was called.
2675
2341
  */
2676
- once(event: "Runtime.executionContextsCleared", listener: () => void): this;
2342
+ prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2677
2343
 
2678
2344
  /**
2679
- * Issued when object should be inspected (for example, as a result of inspect() command line API
2680
- * call).
2345
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2681
2346
  */
2682
- once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2683
-
2684
- prependListener(event: string, listener: (...args: any[]) => void): this;
2347
+ prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2685
2348
 
2686
2349
  /**
2687
- * Emitted when any notification from the V8 Inspector is received.
2350
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2688
2351
  */
2689
- prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2352
+ prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2690
2353
 
2691
2354
  /**
2692
- * Issued when new console message is added.
2355
+ * Fired when virtual machine fails to parse the script.
2693
2356
  */
2694
- prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2357
+ prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2695
2358
 
2696
2359
  /**
2697
2360
  * Fired when breakpoint is resolved to an actual script and location.
@@ -2709,86 +2372,81 @@ declare module "inspector" {
2709
2372
  prependListener(event: "Debugger.resumed", listener: () => void): this;
2710
2373
 
2711
2374
  /**
2712
- * Fired when virtual machine fails to parse the script.
2375
+ * Issued when new console message is added.
2713
2376
  */
2714
- prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2377
+ prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2715
2378
 
2716
2379
  /**
2717
- * Fired when virtual machine parses script. This event is also fired for all known and uncollected
2718
- * scripts upon enabling debugger.
2380
+ * Sent when new profile recording is started using console.profile() call.
2719
2381
  */
2720
- prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2382
+ prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2721
2383
 
2384
+ prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2722
2385
  prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2386
+ prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2387
+ prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2723
2388
 
2724
2389
  /**
2725
- * If heap objects tracking has been started then backend may send update for one or more fragments
2390
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2726
2391
  */
2727
- prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2392
+ prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2728
2393
 
2729
2394
  /**
2730
- * If heap objects tracking has been started then backend regularly sends a current value for last
2731
- * seen object id and corresponding timestamp. If the were changes in the heap since last event
2732
- * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2395
+ * If heap objects tracking has been started then backend may send update for one or more fragments
2733
2396
  */
2734
- prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2397
+ prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2735
2398
 
2736
- prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2737
- prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2738
- prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2399
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2739
2400
 
2740
2401
  /**
2741
- * Sent when new profile recording is started using console.profile() call.
2402
+ * Emitted when any notification from the V8 Inspector is received.
2742
2403
  */
2743
- prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2404
+ prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2744
2405
 
2745
2406
  /**
2746
- * Issued when console API was called.
2407
+ * Issued when new execution context is created.
2747
2408
  */
2748
- prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2409
+ prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2749
2410
 
2750
2411
  /**
2751
- * Issued when unhandled exception was revoked.
2412
+ * Issued when execution context is destroyed.
2752
2413
  */
2753
- prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2414
+ prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2754
2415
 
2755
2416
  /**
2756
- * Issued when exception was thrown and unhandled.
2417
+ * Issued when all executionContexts were cleared in browser
2757
2418
  */
2758
- prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2419
+ prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2759
2420
 
2760
2421
  /**
2761
- * Issued when new execution context is created.
2422
+ * Issued when exception was thrown and unhandled.
2762
2423
  */
2763
- prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2424
+ prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2764
2425
 
2765
2426
  /**
2766
- * Issued when execution context is destroyed.
2427
+ * Issued when unhandled exception was revoked.
2767
2428
  */
2768
- prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2429
+ prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2769
2430
 
2770
2431
  /**
2771
- * Issued when all executionContexts were cleared in browser
2432
+ * Issued when console API was called.
2772
2433
  */
2773
- prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2434
+ prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2774
2435
 
2775
2436
  /**
2776
- * Issued when object should be inspected (for example, as a result of inspect() command line API
2777
- * call).
2437
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2778
2438
  */
2779
- prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2780
-
2781
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2439
+ prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2782
2440
 
2783
2441
  /**
2784
- * Emitted when any notification from the V8 Inspector is received.
2442
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2785
2443
  */
2786
- prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2444
+ prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2787
2445
 
2788
2446
  /**
2789
- * Issued when new console message is added.
2447
+ * Fired when virtual machine fails to parse the script.
2790
2448
  */
2791
- prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2449
+ prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2792
2450
 
2793
2451
  /**
2794
2452
  * Fired when breakpoint is resolved to an actual script and location.
@@ -2806,74 +2464,29 @@ declare module "inspector" {
2806
2464
  prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
2807
2465
 
2808
2466
  /**
2809
- * Fired when virtual machine fails to parse the script.
2810
- */
2811
- prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2812
-
2813
- /**
2814
- * Fired when virtual machine parses script. This event is also fired for all known and uncollected
2815
- * scripts upon enabling debugger.
2816
- */
2817
- prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2818
-
2819
- prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2820
-
2821
- /**
2822
- * If heap objects tracking has been started then backend may send update for one or more fragments
2823
- */
2824
- prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2825
-
2826
- /**
2827
- * If heap objects tracking has been started then backend regularly sends a current value for last
2828
- * seen object id and corresponding timestamp. If the were changes in the heap since last event
2829
- * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2467
+ * Issued when new console message is added.
2830
2468
  */
2831
- prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2832
-
2833
- prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2834
- prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2835
- prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2469
+ prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2836
2470
 
2837
2471
  /**
2838
2472
  * Sent when new profile recording is started using console.profile() call.
2839
2473
  */
2840
2474
  prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2841
2475
 
2842
- /**
2843
- * Issued when console API was called.
2844
- */
2845
- prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2846
-
2847
- /**
2848
- * Issued when unhandled exception was revoked.
2849
- */
2850
- prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2851
-
2852
- /**
2853
- * Issued when exception was thrown and unhandled.
2854
- */
2855
- prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2856
-
2857
- /**
2858
- * Issued when new execution context is created.
2859
- */
2860
- prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2861
-
2862
- /**
2863
- * Issued when execution context is destroyed.
2864
- */
2865
- prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2476
+ prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2477
+ prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2478
+ prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2479
+ prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2866
2480
 
2867
2481
  /**
2868
- * Issued when all executionContexts were cleared in browser
2482
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2869
2483
  */
2870
- prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2484
+ prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2871
2485
 
2872
2486
  /**
2873
- * Issued when object should be inspected (for example, as a result of inspect() command line API
2874
- * call).
2487
+ * If heap objects tracking has been started then backend may send update for one or more fragments
2875
2488
  */
2876
- prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2489
+ prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2877
2490
  }
2878
2491
 
2879
2492
  // Top Level API
@@ -2885,15 +2498,15 @@ declare module "inspector" {
2885
2498
  * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
2886
2499
  * @param wait Block until a client has connected. Optional, defaults to false.
2887
2500
  */
2888
- function open(port?: number, host?: string, wait?: boolean): void;
2501
+ export function open(port?: number, host?: string, wait?: boolean): void;
2889
2502
 
2890
2503
  /**
2891
2504
  * Deactivate the inspector. Blocks until there are no active connections.
2892
2505
  */
2893
- function close(): void;
2506
+ export function close(): void;
2894
2507
 
2895
2508
  /**
2896
2509
  * Return the URL of the active inspector, or undefined if there is none.
2897
2510
  */
2898
- function url(): string;
2511
+ export function url(): string;
2899
2512
  }