* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
*/
exportfunctionwatch(
filename:PathLike,
options?:WatchOptions|BufferEncoding|null,
listener?:WatchListener<string>,
):FSWatcher;
/**
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
* Synchronously tests whether or not the given path exists by checking with the file system.
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
*/
exportfunctionexistsSync(path:PathLike):boolean;
exportnamespaceconstants{
// File Access Constants
/** Constant for fs.access(). File is visible to the calling process. */
constF_OK:number;
/** Constant for fs.access(). File can be read by the calling process. */
constR_OK:number;
/** Constant for fs.access(). File can be written by the calling process. */
constW_OK:number;
/** Constant for fs.access(). File can be executed by the calling process. */
constX_OK:number;
// File Copy Constants
/** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
constCOPYFILE_EXCL:number;
/**
* Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
* If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
*/
constCOPYFILE_FICLONE:number;
/**
* Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
* If the underlying platform does not support copy-on-write, then the operation will fail with an error.
*/
constCOPYFILE_FICLONE_FORCE:number;
// File Open Constants
/** Constant for fs.open(). Flag indicating to open a file for read-only access. */
constO_RDONLY:number;
/** Constant for fs.open(). Flag indicating to open a file for write-only access. */
constO_WRONLY:number;
/** Constant for fs.open(). Flag indicating to open a file for read-write access. */
constO_RDWR:number;
/** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
constO_CREAT:number;
/** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
constO_EXCL:number;
/**
* Constant for fs.open(). Flag indicating that if path identifies a terminal device,
* opening the path shall not cause that terminal to become the controlling terminal for the process
* (if the process does not already have one).
*/
constO_NOCTTY:number;
/** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
constO_TRUNC:number;
/** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
constO_APPEND:number;
/** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
constO_DIRECTORY:number;
/**
* constant for fs.open().
* Flag indicating reading accesses to the file system will no longer result in
* an update to the atime information associated with the file.
* This flag is available on Linux operating systems only.
*/
constO_NOATIME:number;
/** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
constO_NOFOLLOW:number;
/** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
constO_SYNC:number;
/** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
constO_DSYNC:number;
/** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
constO_SYMLINK:number;
/** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
constO_DIRECT:number;
/** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
constO_NONBLOCK:number;
// File Type Constants
/** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
constS_IFMT:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
constS_IFREG:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
constS_IFDIR:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
constS_IFCHR:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
constS_IFBLK:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
constS_IFIFO:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
constS_IFLNK:number;
/** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
constS_IFSOCK:number;
// File Mode Constants
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
constS_IRWXU:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
constS_IRUSR:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
constS_IWUSR:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
constS_IXUSR:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
constS_IRWXG:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
constS_IRGRP:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
constS_IWGRP:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
constS_IXGRP:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
constS_IRWXO:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
constS_IROTH:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
constS_IWOTH:number;
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
constS_IXOTH:number;
/**
* When set, a memory file mapping is used to access the file. This flag
* is available on Windows operating systems only. On other operating systems,
* this flag is ignored.
*/
constUV_FS_O_FILEMAP:number;
}
/**
* Asynchronously tests a user's permissions for the file specified by path.
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
* No arguments other than a possible exception are given to the callback function.
* Node.js makes no guarantees about the atomicity of the copy operation.
* If an error occurs after the destination file has been opened for writing, Node.js will attempt
* to remove the destination.
* @param src A path to the source file.
* @param dest A path to the destination file.
* @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
*/
functionwatch(
filename:PathLike,
options?:WatchOptions|BufferEncoding
):AsyncIterable<string>;
/**
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
* Returns a buffer which is the result of concatenating all the buffers in the list together.
*
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
* If the list has exactly one item, then the first item of the list is returned.
* If the list has more than one item, then a new Buffer is created.
*
* @param list An array of Buffer objects to concatenate
* @param totalLength Total length of the buffers when concatenated.
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
* 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
*/
interfacePropertyPreview{
/**
* 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
*/
interfaceEntryPreview{
/**
* Preview of the key. Specified for map-like collection entries.
*/
key?:ObjectPreview;
/**
* Preview of the value.
*/
value:ObjectPreview;
}
/**
* Object property descriptor.
*/
interfacePropertyDescriptor{
/**
* 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.
*/
interfaceInternalPropertyDescriptor{
/**
* 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.
*/
interfaceCallArgument{
/**
* 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.
*/
typeExecutionContextId=number;
/**
* Description of an isolated world.
*/
interfaceExecutionContextDescription{
/**
* 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.
*/
interfaceExceptionDetails{
/**
* 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.
*/
typeTimestamp=number;
/**
* Stack entry for runtime errors and assertions.
*/
interfaceCallFrame{
/**
* 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.
*/
interfaceStackTrace{
/**
* 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
*/
typeUniqueDebuggerId=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
*/
interfaceStackTraceId{
id:string;
debuggerId?:UniqueDebuggerId;
}
interfaceEvaluateParameterType{
/**
* 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;
}
interfaceAwaitPromiseParameterType{
/**
* 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;
}
interfaceCallFunctionOnParameterType{
/**
* 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;
}
interfaceGetPropertiesParameterType{
/**
* 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.
* 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;
}
interfaceRunScriptParameterType{
/**
* 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;
}
interfaceQueryObjectsParameterType{
/**
* Identifier of the prototype to return objects for.
*/
prototypeObjectId:RemoteObjectId;
}
interfaceGlobalLexicalScopeNamesParameterType{
/**
* Specifies in which execution context to lookup global scope variables.
*/
executionContextId?:ExecutionContextId;
}
interfaceEvaluateReturnType{
/**
* Evaluation result.
*/
result:RemoteObject;
/**
* Exception details.
*/
exceptionDetails?:ExceptionDetails;
}
interfaceAwaitPromiseReturnType{
/**
* Promise result. Will contain rejected value if promise was rejected.
*/
result:RemoteObject;
/**
* Exception details if stack strace is available.
*/
exceptionDetails?:ExceptionDetails;
}
interfaceCallFunctionOnReturnType{
/**
* Call result.
*/
result:RemoteObject;
/**
* Exception details.
*/
exceptionDetails?:ExceptionDetails;
}
interfaceGetPropertiesReturnType{
/**
* Object properties.
*/
result:PropertyDescriptor[];
/**
* Internal object properties (only of the element itself).
*/
internalProperties?:InternalPropertyDescriptor[];
/**
* Exception details.
*/
exceptionDetails?:ExceptionDetails;
}
interfaceCompileScriptReturnType{
/**
* Id of the script.
*/
scriptId?:ScriptId;
/**
* Exception details.
*/
exceptionDetails?:ExceptionDetails;
}
interfaceRunScriptReturnType{
/**
* Run result.
*/
result:RemoteObject;
/**
* Exception details.
*/
exceptionDetails?:ExceptionDetails;
}
interfaceQueryObjectsReturnType{
/**
* Array with objects.
*/
objects:RemoteObject;
}
interfaceGlobalLexicalScopeNamesReturnType{
names:string[];
}
interfaceExecutionContextCreatedEventDataType{
/**
* A newly created execution context.
*/
context:ExecutionContextDescription;
}
interfaceExecutionContextDestroyedEventDataType{
/**
* Id of the destroyed context
*/
executionContextId:ExecutionContextId;
}
interfaceExceptionThrownEventDataType{
/**
* Timestamp of the exception.
*/
timestamp:Timestamp;
exceptionDetails:ExceptionDetails;
}
interfaceExceptionRevokedEventDataType{
/**
* Reason describing why exception was revoked.
*/
reason:string;
/**
* The id of revoked exception, as reported in <code>exceptionThrown</code>.
*/
exceptionId:number;
}
interfaceConsoleAPICalledEventDataType{
/**
* 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;
}
interfaceInspectRequestedEventDataType{
object:RemoteObject;
hints:{};
}
}
namespaceDebugger{
/**
* Breakpoint identifier.
*/
typeBreakpointId=string;
/**
* Call frame identifier.
*/
typeCallFrameId=string;
/**
* Location in the source code.
*/
interfaceLocation{
/**
* 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
*/
interfaceScriptPosition{
lineNumber:number;
columnNumber:number;
}
/**
* JavaScript call frame. Array of call frames form the call stack.
*/
interfaceCallFrame{
/**
* 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.
*/
interfaceScope{
/**
* 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.
*/
interfaceSearchMatch{
/**
* Line number in resource content.
*/
lineNumber:number;
/**
* Line with match content.
*/
lineContent:string;
}
interfaceBreakLocation{
/**
* 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;
}
interfaceSetBreakpointsActiveParameterType{
/**
* New value for breakpoints active state.
*/
active:boolean;
}
interfaceSetSkipAllPausesParameterType{
/**
* New value for skip pauses state.
*/
skip:boolean;
}
interfaceSetBreakpointByUrlParameterType{
/**
* 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;
}
interfaceSetBreakpointParameterType{
/**
* 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;
}
interfaceRemoveBreakpointParameterType{
breakpointId:BreakpointId;
}
interfaceGetPossibleBreakpointsParameterType{
/**
* 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;
}
interfaceContinueToLocationParameterType{
/**
* Location to continue to.
*/
location:Location;
targetCallFrames?:string;
}
interfacePauseOnAsyncCallParameterType{
/**
* Debugger will pause when async call with given stack trace is started.
*/
parentStackTraceId:Runtime.StackTraceId;
}
interfaceStepIntoParameterType{
/**
* Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
* @experimental
*/
breakOnAsyncCall?:boolean;
}
interfaceGetStackTraceParameterType{
stackTraceId:Runtime.StackTraceId;
}
interfaceSearchInContentParameterType{
/**
* 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;
}
interfaceSetScriptSourceParameterType{
/**
* 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;
}
interfaceRestartFrameParameterType{
/**
* Call frame identifier to evaluate on.
*/
callFrameId:CallFrameId;
}
interfaceGetScriptSourceParameterType{
/**
* Id of the script to get source for.
*/
scriptId:Runtime.ScriptId;
}
interfaceSetPauseOnExceptionsParameterType{
/**
* Pause on exceptions mode.
*/
state:string;
}
interfaceEvaluateOnCallFrameParameterType{
/**
* 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;
}
interfaceSetVariableValueParameterType{
/**
* 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;
}
interfaceSetReturnValueParameterType{
/**
* New return value.
*/
newValue:Runtime.CallArgument;
}
interfaceSetAsyncCallStackDepthParameterType{
/**
* Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
*/
maxDepth:number;
}
interfaceSetBlackboxPatternsParameterType{
/**
* Array of regexps that will be used to check script url for blackbox state.
*/
patterns:string[];
}
interfaceSetBlackboxedRangesParameterType{
/**
* Id of the script.
*/
scriptId:Runtime.ScriptId;
positions:ScriptPosition[];
}
interfaceEnableReturnType{
/**
* Unique identifier of the debugger.
* @experimental
*/
debuggerId:Runtime.UniqueDebuggerId;
}
interfaceSetBreakpointByUrlReturnType{
/**
* Id of the created breakpoint for further reference.
*/
breakpointId:BreakpointId;
/**
* List of the locations this breakpoint resolved into upon addition.
*/
locations:Location[];
}
interfaceSetBreakpointReturnType{
/**
* Id of the created breakpoint for further reference.
*/
breakpointId:BreakpointId;
/**
* Location this breakpoint resolved into.
*/
actualLocation:Location;
}
interfaceGetPossibleBreakpointsReturnType{
/**
* List of the possible breakpoint locations.
*/
locations:BreakLocation[];
}
interfaceGetStackTraceReturnType{
stackTrace:Runtime.StackTrace;
}
interfaceSearchInContentReturnType{
/**
* List of search matches.
*/
result:SearchMatch[];
}
interfaceSetScriptSourceReturnType{
/**
* 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;
}
interfaceRestartFrameReturnType{
/**
* New stack trace.
*/
callFrames:CallFrame[];
/**
* Async stack trace, if any.
*/
asyncStackTrace?:Runtime.StackTrace;
/**
* Async stack trace, if any.
* @experimental
*/
asyncStackTraceId?:Runtime.StackTraceId;
}
interfaceGetScriptSourceReturnType{
/**
* Script source.
*/
scriptSource:string;
}
interfaceEvaluateOnCallFrameReturnType{
/**
* Object wrapper for the evaluation result.
*/
result:Runtime.RemoteObject;
/**
* Exception details.
*/
exceptionDetails?:Runtime.ExceptionDetails;
}
interfaceScriptParsedEventDataType{
/**
* 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;
}
interfaceScriptFailedToParseEventDataType{
/**
* 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.
* 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;
}
}
namespaceConsole{
/**
* Console message.
*/
interfaceConsoleMessage{
/**
* 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).
* Allocations size in bytes for the node excluding children.
*/
selfSize:number;
/**
* Child nodes.
*/
children:SamplingHeapProfileNode[];
}
/**
* Profile.
*/
interfaceSamplingHeapProfile{
head:SamplingHeapProfileNode;
}
interfaceStartTrackingHeapObjectsParameterType{
trackAllocations?:boolean;
}
interfaceStopTrackingHeapObjectsParameterType{
/**
* If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
*/
reportProgress?:boolean;
}
interfaceTakeHeapSnapshotParameterType{
/**
* If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
*/
reportProgress?:boolean;
}
interfaceGetObjectByHeapObjectIdParameterType{
objectId:HeapSnapshotObjectId;
/**
* Symbolic group name that can be used to release multiple objects.
*/
objectGroup?:string;
}
interfaceAddInspectedHeapObjectParameterType{
/**
* Heap snapshot object id to be accessible by means of $x command line API.
*/
heapObjectId:HeapSnapshotObjectId;
}
interfaceGetHeapObjectIdParameterType{
/**
* Identifier of the object to get heap object id for.
*/
objectId:Runtime.RemoteObjectId;
}
interfaceStartSamplingParameterType{
/**
* Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
*/
samplingInterval?:number;
}
interfaceGetObjectByHeapObjectIdReturnType{
/**
* Evaluation result.
*/
result:Runtime.RemoteObject;
}
interfaceGetHeapObjectIdReturnType{
/**
* Id of the heap snapshot object corresponding to the passed remote object id.
*/
heapSnapshotObjectId:HeapSnapshotObjectId;
}
interfaceStopSamplingReturnType{
/**
* Recorded sampling heap profile.
*/
profile:SamplingHeapProfile;
}
interfaceGetSamplingProfileReturnType{
/**
* Return the sampling profile being collected.
*/
profile:SamplingHeapProfile;
}
interfaceAddHeapSnapshotChunkEventDataType{
chunk:string;
}
interfaceReportHeapSnapshotProgressEventDataType{
done:number;
total:number;
finished?:boolean;
}
interfaceLastSeenObjectIdEventDataType{
lastSeenObjectId:number;
timestamp:number;
}
interfaceHeapStatsUpdateEventDataType{
/**
* 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.
*/
statsUpdate:number[];
}
}
namespaceNodeTracing{
interfaceTraceConfig{
/**
* Controls how the trace buffer stores data.
*/
recordMode?:string;
/**
* Included category filters.
*/
includedCategories:string[];
}
interfaceStartParameterType{
traceConfig:TraceConfig;
}
interfaceGetCategoriesReturnType{
/**
* A list of supported tracing categories.
*/
categories:string[];
}
interfaceDataCollectedEventDataType{
value:Array<{}>;
}
}
namespaceNodeWorker{
typeWorkerID=string;
/**
* Unique identifier of attached debugging session.
*/
typeSessionID=string;
interfaceWorkerInfo{
workerId:WorkerID;
type:string;
title:string;
url:string;
}
interfaceSendMessageToWorkerParameterType{
message:string;
/**
* Identifier of the session.
*/
sessionId:SessionID;
}
interfaceEnableParameterType{
/**
* Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
* message to run them.
*/
waitForDebuggerOnStart:boolean;
}
interfaceDetachParameterType{
sessionId:SessionID;
}
interfaceAttachedToWorkerEventDataType{
/**
* Identifier assigned to the session used to send/receive messages.
* 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.
* 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.
* This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. 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.
* 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>.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* A parsed path object generated by path.parse() or consumed by path.format().
*/
interfaceParsedPath{
/**
* The root of the path such as '/' or 'c:\'
*/
root:string;
/**
* The full directory path such as '/home/user/dir' or 'c:\path\dir'
*/
dir:string;
/**
* The file name including extension (if any) such as 'index.html'
*/
base:string;
/**
* The file extension (if any) such as '.html'
*/
ext:string;
/**
* The file name without extension (if any) such as 'index'
*/
name:string;
}
interfaceFormatInputPathObject{
/**
* The root of the path such as '/' or 'c:\'
*/
root?:string;
/**
* The full directory path such as '/home/user/dir' or 'c:\path\dir'
*/
dir?:string;
/**
* The file name including extension (if any) such as 'index.html'
*/
base?:string;
/**
* The file extension (if any) such as '.html'
*/
ext?:string;
/**
* The file name without extension (if any) such as 'index'
*/
name?:string;
}
interfacePlatformPath{
/**
* Normalize a string path, reducing '..' and '.' parts.
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
*
* @param p string path to normalize.
*/
normalize(p:string):string;
/**
* Join all arguments together and normalize the resulting path.
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
*
* @param paths paths to join.
*/
join(...paths:string[]):string;
/**
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
*
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
*
* If {to} isn't already absolute, {from} arguments are prepended in right to left order,
* until an absolute path is found. If after using all {from} paths still no absolute path is found,
* the current working directory is used as well. The resulting path is normalized,
* and trailing slashes are removed unless the path gets resolved to the root directory.
*
* @param pathSegments string paths to join. Non-string arguments are ignored.
*/
resolve(...pathSegments:string[]):string;
/**
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
*
* @param path path to test.
*/
isAbsolute(p:string):boolean;
/**
* Solve the relative path from {from} to {to}.
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
*/
relative(from:string,to:string):string;
/**
* Return the directory name of a path. Similar to the Unix dirname command.
*
* @param p the path to evaluate.
*/
dirname(p:string):string;
/**
* Return the last portion of a path. Similar to the Unix basename command.
* Often used to extract the file name from a fully qualified path.
*
* @param p the path to evaluate.
* @param ext optionally, an extension to remove from the result.
*/
basename(p:string,ext?:string):string;
/**
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
*
* @param p the path to evaluate.
*/
extname(p:string):string;
/**
* The platform-specific file separator. '\\' or '/'.
*/
readonlysep:string;
/**
* The platform-specific file delimiter. ';' or ':'.
*/
readonlydelimiter:string;
/**
* Returns an object from a path string - the opposite of format().
*
* @param pathString path to evaluate.
*/
parse(p:string):ParsedPath;
/**
* Returns a path string from an object - the opposite of parse().
*
* @param pathString path to evaluate.
*/
format(pP:FormatInputPathObject):string;
/**
* On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
* If path is not a string, path will be returned without modifications.
* This method is meaningful only on Windows system.
* On POSIX systems, the method is non-operational and always returns path without modifications.