UNPKG

prowler-sdk-poc

Version:
1,624 lines (1,516 loc) 122 kB
// tslint:disable-next-line:dt-header // Type definitions for inspector // These definitions are auto-generated. // Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 // for more information. // tslint:disable:max-line-length /** * The inspector module provides an API for interacting with the V8 inspector. */ declare module 'inspector' { import EventEmitter = require('events'); interface InspectorNotification<T> { method: string; params: T; } namespace Schema { /** * Description of the protocol domain. */ interface Domain { /** * Domain name. */ name: string; /** * Domain version. */ version: string; } interface GetDomainsReturnType { /** * List of supported domains. */ domains: Domain[]; } } namespace Runtime { /** * Unique script identifier. */ type ScriptId = string; /** * Unique object identifier. */ type RemoteObjectId = string; /** * Primitive value which cannot be JSON-stringified. */ type UnserializableValue = string; /** * Mirror object referencing original JavaScript object. */ interface RemoteObject { /** * Object type. */ type: string; /** * Object subtype hint. Specified for <code>object</code> type values only. */ subtype?: string; /** * Object class (constructor) name. Specified for <code>object</code> type values only. */ className?: string; /** * Remote object value in case of primitive values or JSON values (if it was requested). */ value?: any; /** * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property. */ unserializableValue?: UnserializableValue; /** * String representation of the object. */ description?: string; /** * Unique object identifier (for non-primitive values). */ objectId?: RemoteObjectId; /** * Preview containing abbreviated property values. Specified for <code>object</code> type values only. * @experimental */ preview?: ObjectPreview; /** * @experimental */ customPreview?: CustomPreview; } /** * @experimental */ interface CustomPreview { header: string; hasBody: boolean; formatterObjectId: RemoteObjectId; bindRemoteObjectFunctionId: RemoteObjectId; configObjectId?: RemoteObjectId; } /** * Object containing abbreviated remote object value. * @experimental */ interface ObjectPreview { /** * Object type. */ type: string; /** * Object subtype hint. Specified for <code>object</code> type values only. */ subtype?: string; /** * String representation of the object. */ description?: string; /** * True iff some of the properties or entries of the original object did not fit. */ overflow: boolean; /** * List of the properties. */ properties: PropertyPreview[]; /** * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only. */ entries?: EntryPreview[]; } /** * @experimental */ interface PropertyPreview { /** * Property name. */ name: string; /** * Object type. Accessor means that the property itself is an accessor property. */ type: string; /** * User-friendly property value string. */ value?: string; /** * Nested value preview. */ valuePreview?: ObjectPreview; /** * Object subtype hint. Specified for <code>object</code> type values only. */ subtype?: string; } /** * @experimental */ interface EntryPreview { /** * Preview of the key. Specified for map-like collection entries. */ key?: ObjectPreview; /** * Preview of the value. */ value: ObjectPreview; } /** * Object property descriptor. */ interface PropertyDescriptor { /** * Property name or symbol description. */ name: string; /** * The value associated with the property. */ value?: RemoteObject; /** * True if the value associated with the property may be changed (data descriptors only). */ writable?: boolean; /** * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only). */ get?: RemoteObject; /** * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only). */ set?: RemoteObject; /** * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. */ configurable: boolean; /** * True if this property shows up during enumeration of the properties on the corresponding object. */ enumerable: boolean; /** * True if the result was thrown during the evaluation. */ wasThrown?: boolean; /** * True if the property is owned for the object. */ isOwn?: boolean; /** * Property symbol object, if the property is of the <code>symbol</code> type. */ symbol?: RemoteObject; } /** * Object internal property descriptor. This property isn't normally visible in JavaScript code. */ interface InternalPropertyDescriptor { /** * Conventional property name. */ name: string; /** * The value associated with the property. */ value?: RemoteObject; } /** * 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. */ interface CallArgument { /** * Primitive value or serializable javascript object. */ value?: any; /** * Primitive value which can not be JSON-stringified. */ unserializableValue?: UnserializableValue; /** * Remote object handle. */ objectId?: RemoteObjectId; } /** * Id of an execution context. */ type ExecutionContextId = number; /** * Description of an isolated world. */ interface ExecutionContextDescription { /** * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. */ id: ExecutionContextId; /** * Execution context origin. */ origin: string; /** * Human readable name describing given context. */ name: string; /** * Embedder-specific auxiliary data. */ auxData?: {}; } /** * Detailed information about exception (or error) that was thrown during script compilation or execution. */ interface ExceptionDetails { /** * Exception id. */ exceptionId: number; /** * Exception text, which should be used together with exception object when available. */ text: string; /** * Line number of the exception location (0-based). */ lineNumber: number; /** * Column number of the exception location (0-based). */ columnNumber: number; /** * Script ID of the exception location. */ scriptId?: ScriptId; /** * URL of the exception location, to be used when the script was not reported. */ url?: string; /** * JavaScript stack trace if available. */ stackTrace?: StackTrace; /** * Exception object if available. */ exception?: RemoteObject; /** * Identifier of the context where exception happened. */ executionContextId?: ExecutionContextId; } /** * Number of milliseconds since epoch. */ type Timestamp = number; /** * Stack entry for runtime errors and assertions. */ interface CallFrame { /** * JavaScript function name. */ functionName: string; /** * JavaScript script id. */ scriptId: ScriptId; /** * JavaScript script name or url. */ url: string; /** * JavaScript script line number (0-based). */ lineNumber: number; /** * JavaScript script column number (0-based). */ columnNumber: number; } /** * Call frames for assertions or error messages. */ interface StackTrace { /** * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. */ description?: string; /** * JavaScript function name. */ callFrames: CallFrame[]; /** * Asynchronous JavaScript stack trace that preceded this stack, if available. */ parent?: StackTrace; /** * Asynchronous JavaScript stack trace that preceded this stack, if available. * @experimental */ parentId?: StackTraceId; } /** * Unique identifier of current debugger. * @experimental */ type UniqueDebuggerId = string; /** * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages. * @experimental */ interface StackTraceId { id: string; debuggerId?: UniqueDebuggerId; } interface EvaluateParameterType { /** * Expression to evaluate. */ expression: string; /** * Symbolic group name that can be used to release multiple objects. */ objectGroup?: string; /** * Determines whether Command Line API should be available during the evaluation. */ includeCommandLineAPI?: boolean; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. */ silent?: boolean; /** * 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. */ contextId?: ExecutionContextId; /** * Whether the result is expected to be a JSON object that should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. * @experimental */ generatePreview?: boolean; /** * Whether execution should be treated as initiated by user in the UI. */ userGesture?: boolean; /** * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved. */ awaitPromise?: boolean; } interface AwaitPromiseParameterType { /** * Identifier of the promise. */ promiseObjectId: RemoteObjectId; /** * Whether the result is expected to be a JSON object that should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. */ generatePreview?: boolean; } interface CallFunctionOnParameterType { /** * Declaration of the function to call. */ functionDeclaration: string; /** * Identifier of the object to call function on. Either objectId or executionContextId should be specified. */ objectId?: RemoteObjectId; /** * Call arguments. All call arguments must belong to the same JavaScript world as the target object. */ arguments?: CallArgument[]; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. */ silent?: boolean; /** * Whether the result is expected to be a JSON object which should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. * @experimental */ generatePreview?: boolean; /** * Whether execution should be treated as initiated by user in the UI. */ userGesture?: boolean; /** * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved. */ awaitPromise?: boolean; /** * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. */ executionContextId?: ExecutionContextId; /** * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. */ objectGroup?: string; } interface GetPropertiesParameterType { /** * Identifier of the object to return properties for. */ objectId: RemoteObjectId; /** * If true, returns properties belonging only to the element itself, not to its prototype chain. */ ownProperties?: boolean; /** * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. * @experimental */ accessorPropertiesOnly?: boolean; /** * Whether preview should be generated for the results. * @experimental */ generatePreview?: boolean; } interface ReleaseObjectParameterType { /** * Identifier of the object to release. */ objectId: RemoteObjectId; } interface ReleaseObjectGroupParameterType { /** * Symbolic object group name. */ objectGroup: string; } interface SetCustomObjectFormatterEnabledParameterType { enabled: boolean; } interface CompileScriptParameterType { /** * Expression to compile. */ expression: string; /** * Source url to be set for the script. */ sourceURL: string; /** * Specifies whether the compiled script should be persisted. */ persistScript: boolean; /** * 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. */ executionContextId?: ExecutionContextId; } interface RunScriptParameterType { /** * Id of the script to run. */ scriptId: ScriptId; /** * 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. */ executionContextId?: ExecutionContextId; /** * Symbolic group name that can be used to release multiple objects. */ objectGroup?: string; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. */ silent?: boolean; /** * Determines whether Command Line API should be available during the evaluation. */ includeCommandLineAPI?: boolean; /** * Whether the result is expected to be a JSON object which should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. */ generatePreview?: boolean; /** * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved. */ awaitPromise?: boolean; } interface QueryObjectsParameterType { /** * Identifier of the prototype to return objects for. */ prototypeObjectId: RemoteObjectId; } interface GlobalLexicalScopeNamesParameterType { /** * Specifies in which execution context to lookup global scope variables. */ executionContextId?: ExecutionContextId; } interface EvaluateReturnType { /** * Evaluation result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } interface AwaitPromiseReturnType { /** * Promise result. Will contain rejected value if promise was rejected. */ result: RemoteObject; /** * Exception details if stack strace is available. */ exceptionDetails?: ExceptionDetails; } interface CallFunctionOnReturnType { /** * Call result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } interface GetPropertiesReturnType { /** * Object properties. */ result: PropertyDescriptor[]; /** * Internal object properties (only of the element itself). */ internalProperties?: InternalPropertyDescriptor[]; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } interface CompileScriptReturnType { /** * Id of the script. */ scriptId?: ScriptId; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } interface RunScriptReturnType { /** * Run result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } interface QueryObjectsReturnType { /** * Array with objects. */ objects: RemoteObject; } interface GlobalLexicalScopeNamesReturnType { names: string[]; } interface ExecutionContextCreatedEventDataType { /** * A newly created execution context. */ context: ExecutionContextDescription; } interface ExecutionContextDestroyedEventDataType { /** * Id of the destroyed context */ executionContextId: ExecutionContextId; } interface ExceptionThrownEventDataType { /** * Timestamp of the exception. */ timestamp: Timestamp; exceptionDetails: ExceptionDetails; } interface ExceptionRevokedEventDataType { /** * Reason describing why exception was revoked. */ reason: string; /** * The id of revoked exception, as reported in <code>exceptionThrown</code>. */ exceptionId: number; } interface ConsoleAPICalledEventDataType { /** * Type of the call. */ type: string; /** * Call arguments. */ args: RemoteObject[]; /** * Identifier of the context where the call was made. */ executionContextId: ExecutionContextId; /** * Call timestamp. */ timestamp: Timestamp; /** * Stack trace captured when the call was made. */ stackTrace?: StackTrace; /** * 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. * @experimental */ context?: string; } interface InspectRequestedEventDataType { object: RemoteObject; hints: {}; } } namespace Debugger { /** * Breakpoint identifier. */ type BreakpointId = string; /** * Call frame identifier. */ type CallFrameId = string; /** * Location in the source code. */ interface Location { /** * Script identifier as reported in the <code>Debugger.scriptParsed</code>. */ scriptId: Runtime.ScriptId; /** * Line number in the script (0-based). */ lineNumber: number; /** * Column number in the script (0-based). */ columnNumber?: number; } /** * Location in the source code. * @experimental */ interface ScriptPosition { lineNumber: number; columnNumber: number; } /** * JavaScript call frame. Array of call frames form the call stack. */ interface CallFrame { /** * Call frame identifier. This identifier is only valid while the virtual machine is paused. */ callFrameId: CallFrameId; /** * Name of the JavaScript function called on this call frame. */ functionName: string; /** * Location in the source code. */ functionLocation?: Location; /** * Location in the source code. */ location: Location; /** * JavaScript script name or url. */ url: string; /** * Scope chain for this call frame. */ scopeChain: Scope[]; /** * <code>this</code> object for this call frame. */ this: Runtime.RemoteObject; /** * The value being returned, if the function is at return point. */ returnValue?: Runtime.RemoteObject; } /** * Scope description. */ interface Scope { /** * Scope type. */ type: string; /** * 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. */ object: Runtime.RemoteObject; name?: string; /** * Location in the source code where scope starts */ startLocation?: Location; /** * Location in the source code where scope ends */ endLocation?: Location; } /** * Search match for resource. */ interface SearchMatch { /** * Line number in resource content. */ lineNumber: number; /** * Line with match content. */ lineContent: string; } interface BreakLocation { /** * Script identifier as reported in the <code>Debugger.scriptParsed</code>. */ scriptId: Runtime.ScriptId; /** * Line number in the script (0-based). */ lineNumber: number; /** * Column number in the script (0-based). */ columnNumber?: number; type?: string; } interface SetBreakpointsActiveParameterType { /** * New value for breakpoints active state. */ active: boolean; } interface SetSkipAllPausesParameterType { /** * New value for skip pauses state. */ skip: boolean; } interface SetBreakpointByUrlParameterType { /** * Line number to set breakpoint at. */ lineNumber: number; /** * URL of the resources to set breakpoint on. */ url?: string; /** * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified. */ urlRegex?: string; /** * Script hash of the resources to set breakpoint on. */ scriptHash?: string; /** * Offset in the line to set breakpoint at. */ columnNumber?: number; /** * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. */ condition?: string; } interface SetBreakpointParameterType { /** * Location to set breakpoint in. */ location: Location; /** * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. */ condition?: string; } interface RemoveBreakpointParameterType { breakpointId: BreakpointId; } interface GetPossibleBreakpointsParameterType { /** * Start of range to search possible breakpoint locations in. */ start: Location; /** * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. */ end?: Location; /** * Only consider locations which are in the same (non-nested) function as start. */ restrictToFunction?: boolean; } interface ContinueToLocationParameterType { /** * Location to continue to. */ location: Location; targetCallFrames?: string; } interface PauseOnAsyncCallParameterType { /** * Debugger will pause when async call with given stack trace is started. */ parentStackTraceId: Runtime.StackTraceId; } interface StepIntoParameterType { /** * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. * @experimental */ breakOnAsyncCall?: boolean; } interface GetStackTraceParameterType { stackTraceId: Runtime.StackTraceId; } interface SearchInContentParameterType { /** * Id of the script to search in. */ scriptId: Runtime.ScriptId; /** * String to search for. */ query: string; /** * If true, search is case sensitive. */ caseSensitive?: boolean; /** * If true, treats string parameter as regex. */ isRegex?: boolean; } interface SetScriptSourceParameterType { /** * Id of the script to edit. */ scriptId: Runtime.ScriptId; /** * New content of the script. */ scriptSource: string; /** * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. */ dryRun?: boolean; } interface RestartFrameParameterType { /** * Call frame identifier to evaluate on. */ callFrameId: CallFrameId; } interface GetScriptSourceParameterType { /** * Id of the script to get source for. */ scriptId: Runtime.ScriptId; } interface SetPauseOnExceptionsParameterType { /** * Pause on exceptions mode. */ state: string; } interface EvaluateOnCallFrameParameterType { /** * Call frame identifier to evaluate on. */ callFrameId: CallFrameId; /** * Expression to evaluate. */ expression: string; /** * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>). */ objectGroup?: string; /** * Specifies whether command line API should be available to the evaluated expression, defaults to false. */ includeCommandLineAPI?: boolean; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. */ silent?: boolean; /** * Whether the result is expected to be a JSON object that should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. * @experimental */ generatePreview?: boolean; /** * Whether to throw an exception if side effect cannot be ruled out during evaluation. */ throwOnSideEffect?: boolean; } interface SetVariableValueParameterType { /** * 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. */ scopeNumber: number; /** * Variable name. */ variableName: string; /** * New variable value. */ newValue: Runtime.CallArgument; /** * Id of callframe that holds variable. */ callFrameId: CallFrameId; } interface SetReturnValueParameterType { /** * New return value. */ newValue: Runtime.CallArgument; } interface SetAsyncCallStackDepthParameterType { /** * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default). */ maxDepth: number; } interface SetBlackboxPatternsParameterType { /** * Array of regexps that will be used to check script url for blackbox state. */ patterns: string[]; } interface SetBlackboxedRangesParameterType { /** * Id of the script. */ scriptId: Runtime.ScriptId; positions: ScriptPosition[]; } interface EnableReturnType { /** * Unique identifier of the debugger. * @experimental */ debuggerId: Runtime.UniqueDebuggerId; } interface SetBreakpointByUrlReturnType { /** * Id of the created breakpoint for further reference. */ breakpointId: BreakpointId; /** * List of the locations this breakpoint resolved into upon addition. */ locations: Location[]; } interface SetBreakpointReturnType { /** * Id of the created breakpoint for further reference. */ breakpointId: BreakpointId; /** * Location this breakpoint resolved into. */ actualLocation: Location; } interface GetPossibleBreakpointsReturnType { /** * List of the possible breakpoint locations. */ locations: BreakLocation[]; } interface GetStackTraceReturnType { stackTrace: Runtime.StackTrace; } interface SearchInContentReturnType { /** * List of search matches. */ result: SearchMatch[]; } interface SetScriptSourceReturnType { /** * New stack trace in case editing has happened while VM was stopped. */ callFrames?: CallFrame[]; /** * Whether current call stack was modified after applying the changes. */ stackChanged?: boolean; /** * Async stack trace, if any. */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. * @experimental */ asyncStackTraceId?: Runtime.StackTraceId; /** * Exception details if any. */ exceptionDetails?: Runtime.ExceptionDetails; } interface RestartFrameReturnType { /** * New stack trace. */ callFrames: CallFrame[]; /** * Async stack trace, if any. */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. * @experimental */ asyncStackTraceId?: Runtime.StackTraceId; } interface GetScriptSourceReturnType { /** * Script source. */ scriptSource: string; } interface EvaluateOnCallFrameReturnType { /** * Object wrapper for the evaluation result. */ result: Runtime.RemoteObject; /** * Exception details. */ exceptionDetails?: Runtime.ExceptionDetails; } interface ScriptParsedEventDataType { /** * Identifier of the script parsed. */ scriptId: Runtime.ScriptId; /** * URL or name of the script parsed (if any). */ url: string; /** * Line offset of the script within the resource with given URL (for script tags). */ startLine: number; /** * Column offset of the script within the resource with given URL. */ startColumn: number; /** * Last line of the script. */ endLine: number; /** * Length of the last line of the script. */ endColumn: number; /** * Specifies script creation context. */ executionContextId: Runtime.ExecutionContextId; /** * Content hash of the script. */ hash: string; /** * Embedder-specific auxiliary data. */ executionContextAuxData?: {}; /** * True, if this script is generated as a result of the live edit operation. * @experimental */ isLiveEdit?: boolean; /** * URL of source map associated with script (if any). */ sourceMapURL?: string; /** * True, if this script has sourceURL. */ hasSourceURL?: boolean; /** * True, if this script is ES6 module. */ isModule?: boolean; /** * This script length. */ length?: number; /** * JavaScript top stack frame of where the script parsed event was triggered if available. * @experimental */ stackTrace?: Runtime.StackTrace; } interface ScriptFailedToParseEventDataType { /** * Identifier of the script parsed. */ scriptId: Runtime.ScriptId; /** * URL or name of the script parsed (if any). */ url: string; /** * Line offset of the script within the resource with given URL (for script tags). */ startLine: number; /** * Column offset of the script within the resource with given URL. */ startColumn: number; /** * Last line of the script. */ endLine: number; /** * Length of the last line of the script. */ endColumn: number; /** * Specifies script creation context. */ executionContextId: Runtime.ExecutionContextId; /** * Content hash of the script. */ hash: string; /** * Embedder-specific auxiliary data. */ executionContextAuxData?: {}; /** * URL of source map associated with script (if any). */ sourceMapURL?: string; /** * True, if this script has sourceURL. */ hasSourceURL?: boolean; /** * True, if this script is ES6 module. */ isModule?: boolean; /** * This script length. */ length?: number; /** * JavaScript top stack frame of where the script parsed event was triggered if available. * @experimental */ stackTrace?: Runtime.StackTrace; } interface BreakpointResolvedEventDataType { /** * Breakpoint unique identifier. */ breakpointId: BreakpointId; /** * Actual breakpoint location. */ location: Location; } interface PausedEventDataType { /** * Call stack the virtual machine stopped on. */ callFrames: CallFrame[]; /** * Pause reason. */ reason: string; /** * Object containing break-specific auxiliary properties. */ data?: {}; /** * Hit breakpoints IDs */ hitBreakpoints?: string[]; /** * Async stack trace, if any. */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. * @experimental */ asyncStackTraceId?: Runtime.StackTraceId; /** * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag. * @experimental */ asyncCallStackTraceId?: Runtime.StackTraceId; } } namespace Console { /** * Console message. */ interface ConsoleMessage { /** * Message source. */ source: string; /** * Message severity. */ level: string; /** * Message text. */ text: string; /** * URL of the message origin. */ url?: string; /** * Line number in the resource that generated this message (1-based). */ line?: number; /** * Column number in the resource that generated this message (1-based). */ column?: number; } interface MessageAddedEventDataType { /** * Console message that has been added. */ message: ConsoleMessage; } } namespace Profiler { /** * Profile node. Holds callsite information, execution statistics and child nodes. */ interface ProfileNode { /** * Unique id of the node. */ id: number; /** * Function location. */ callFrame: Runtime.CallFrame; /** * Number of samples where this node was on top of the call stack. */ hitCount?: number; /** * Child node ids. */ children?: number[]; /** * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. */ deoptReason?: string; /** * An array of source position ticks. */ positionTicks?: PositionTickInfo[]; } /** * Profile. */ interface Profile { /** * The list of profile nodes. First item is the root node. */ nodes: ProfileNode[]; /** * Profiling start timestamp in microseconds. */ startTime: number; /** * Profiling end timestamp in microseconds. */ endTime: number; /** * Ids of samples top nodes. */ samples?: number[]; /** * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. */ timeDeltas?: number[]; } /** * Specifies a number of samples attributed to a certain source position. */ interface PositionTickInfo { /** * Source line number (1-based). */ line: number; /** * Number of samples attributed to the source line. */ ticks: number; } /** * Coverage data for a source range. */ interface CoverageRange { /** * JavaScript script source offset for the range start. */ startOffset: number; /** * JavaScript script source offset for the range end. */ endOffset: number; /** * Collected execution count of the source range. */ count: number; } /** * Coverage data for a JavaScript function. */ interface FunctionCoverage { /** * JavaScript function name. */ functionName: string; /** * Source ranges inside the function with coverage data. */ ranges: CoverageRange[]; /** * Whether coverage data for this function has block granularity. */ isBlockCoverage: boolean; } /** * Coverage data for a JavaScript script. */ interface ScriptCoverage { /** * JavaScript script id. */ scriptId: Runtime.ScriptId; /** * JavaScript script name or url. */ url: string; /** * Functions contained in the script that has coverage data. */ functions: FunctionCoverage[]; } /** * Describes a type collected during runtime. * @experimental */ interface TypeObject { /** * Name of a type collected with type profiling. */ name: string; } /** * Source offset and types for a parameter or return value. * @experimental */ interface TypeProfileEntry { /** * Source offset of the parameter or end of function for return values. */ offset: number; /** * The types for this parameter or return value. */ types: TypeObject[]; } /** * Type profile data collected during runtime for a JavaScript script. * @experimental */ interface ScriptTypeProfile { /** * JavaScript script id. */ scriptId: Runtime.ScriptId; /** * JavaScript script name or url. */ url: string; /** * Type profile entries for parameters and return values of the functions in the script. */ entries: TypeProfileEntry[]; } interface SetSamplingIntervalParameterType { /** * New sampling interval in microseconds. */ interval: number; } interface StartPreciseCoverageParameterType { /** * Collect accurate call counts beyond simple 'covered' or 'not covered'. */ callCount?: boolean; /** * Collect block-based coverage. */ detailed?: boolean; }