default
The global namespace where Deno specific, non-standard APIs are located.
The global namespace where Deno specific, non-standard APIs are located.
Registers the given function as a listener of the given signal event.
Returns the script arguments to the program.
A check to perform as part of a Deno.AtomicOperation
. The checkwill fail if the versionstamp for the key-value pair in the KV store doesnot match the given versionstamp. A check with a null
versionstamp checksthat the key-value pair does not currently exist in the KV store.
Basic authentication credentials to be used with a Deno.Proxy
server when specifying Deno.CreateHttpClientOptions
.
Register a benchmark test which will be run when deno bench
is used onthe command line and the containing module looks like a bench module.
Context that is passed to a benchmarked function. The instance is sharedbetween iterations of the benchmark. Its methods can be used for exampleto override of the measured portion of the function.
The interface for defining a benchmark test using Deno.bench
.
If Deno.resolveDns
is called with "CAA"
record typespecified, it will resolve with an array of objects with this interface.
Change the current working directory to the specified path.
Changes the permission of a specific file/directory of specified path.Ignores the process's umask.
Synchronously changes the permission of a specific file/directory ofspecified path. Ignores the process's umask.
Change owner of a regular file or directory.
Synchronously change owner of a regular file or directory.
Options which can be set when calling Deno.Command
.
The interface returned from calling Deno.Command.output
orDeno.Command.outputSync
which represents the result of spawning thechild process.
Connects to the hostname (default is "127.0.0.1") and port on the namedtransport (default is "tcp"), and resolves to the connection (Conn
).
Establishes a secure connection over TLS (transport layer security) usingan optional list of CA certs, hostname (default is "127.0.0.1") and port.
Gets the size of the console as columns/rows.
Copies the contents and permissions of one file to another specified path,by default creating a new file if needed, else overwriting. Fails if targetpath is a directory or is unwritable.
Synchronously copies the contents and permissions of one file to anotherspecified path, by default creating a new file if needed, else overwriting.Fails if target path is a directory or is unwritable.
Creates a file if none exists or truncates an existing file and resolves toan instance of Deno.FsFile
.
Create a custom HttpClient to use with fetch
. This is anextension of the web platform Fetch API which allows Deno to use customTLS CA certificates and connect via a proxy while using fetch()
.
The options used when creating a Deno.HttpClient
.
Creates a file if none exists or truncates an existing file and returnsan instance of Deno.FsFile
.
Create a cron job that will periodically execute the provided handlercallback based on the specified schedule.
CronSchedule is the interface used for JSON formatcron schedule
.
CronScheduleExpression is used as the type of minute
, hour
,dayOfMonth
, month
, and dayOfWeek
in CronSchedule
.
Return a string representing the current working directory.
A generic transport listener for message-oriented protocols.
Information about a directory entry returned from Deno.readDir
and Deno.readDirSync
.
Opens an external dynamic library and registers symbols, making foreignfunctions available to be called.
A dynamic library resource. Use Deno.dlopen
to load a dynamiclibrary and return this interface.
An interface containing methods to interact with the process environmentvariables.
The permission descriptor for the allow-env
and deny-env
permissions, which controlsaccess to being able to read and write to the process environment variablesas well as access other information about the environment. The optionvariable
allows scoping the permission to a specific environmentvariable.
A set of error constructors that are raised by Deno APIs.
Raised when attempting to open a server listener on an address and portthat already has a listener.
Raised when the underlying operating system reports an EADDRNOTAVAIL
error.
Raised when trying to create a resource, like a file, that alreadyexits.
The underlying IO resource is invalid or closed, and so the operationcould not be performed.
Raised when trying to write to a resource and a broken pipe error occurs.This can happen when trying to write directly to stdout
or stderr
and the operating system is unable to pipe the output for a reasonexternal to the Deno runtime.
Raised when the underlying IO resource is not available because it isbeing awaited on in another block of code.
Raised when the underlying operating system reports an ECONNABORTED
error.
Raised when the underlying operating system reports that a connection toa resource is refused.
Raised when the underlying operating system reports that a connection hasbeen reset. With network servers, it can be a normal occurrence where aclient will abort a connection instead of properly shutting it down.
Raised when too many symbolic links were encountered when resolving thefilename.
Raised in situations where when attempting to load a dynamic import,too many redirects were encountered.
Raised when the underlying operating system reports an EINTR
error. Inmany cases, this underlying IO error will be handled internally withinDeno, or result in an @{link BadResource} error instead.
Raised when an operation to returns data that is invalid for theoperation being performed.
Raised when trying to open, create or write to a directory.
Raised when performing a socket operation but the remote host isnot reachable.
Raised when trying to perform an operation on a path that is not adirectory, when directory is required.
Raised when trying to perform an operation while the relevant Denopermission (like --allow-read
) has not been granted.
Raised when the underlying operating system reports an ENOTCONN
error.
Raised when the underlying operating system indicates that the filewas not found.
Raised when the underlying Deno API is asked to perform a function thatis not currently supported.
Raised when the underlying operating system indicates the current userwhich the Deno process is running under does not have the appropriatepermissions to a file or resource.
Raised when the underlying operating system reports that an I/O operationhas timed out (ETIMEDOUT
).
Raised when attempting to read bytes from a resource, but the EOF wasunexpectedly encountered.
Raised when the underlying operating system would need to block tocomplete but an asynchronous (non-blocking) API is used.
Raised when expecting to write to a IO buffer resulted in zero bytesbeing written.
Returns the path to the current deno executable.
Exit the Deno process with optional exit code.
The exit code for the Deno process.
The permission descriptor for the allow-ffi
and deny-ffi
permissions, which controlsaccess to loading foreign code and interfacing with it via theForeign Function Interface APIavailable in Deno. The option path
allows scoping the permission to aspecific path on the host.
Provides information about a file and is returned byDeno.stat
, Deno.lstat
, Deno.statSync
,and Deno.lstatSync
or from calling stat()
and statSync()
on an Deno.FsFile
instance.
The interface for a foreign function as defined by its parameter and resulttypes.
A foreign library interface descriptor.
Type conversion for foreign symbol return types.
Type conversion for foreign symbol return types and unsafe callbackparameters.
Additional information for FsEvent objects with the "other" kind.
Returned by Deno.watchFs
. It is an async iterator yielding upsystem events. To stop watching the file system by calling .close()
method.
Returns the group id of the process on POSIX platforms. Returns null on windows.
Get the hostname
of the machine the Deno process is running on.
A custom HttpClient
for use with fetch
function. This isdesigned to allow custom certificates or proxies to be used with fetch()
.
Converts the input into a string that has the same format as printed byconsole.log()
.
Option which can be specified when performing Deno.inspect
.
A namespace containing runtime APIs available in Jupyter notebooks.
Broadcast a message on IO pub channel.
Display function for Jupyter Deno Kernel.Mimics the behavior of IPython's display(obj, raw=True)
function to allowasynchronous displaying of objects in Jupyter.
Format an object for displaying in Deno
Show HTML in Jupyter frontends with a tagged template function.
Show Markdown in Jupyter frontends with a tagged template function.
A collection of supported media types and data for Jupyter frontends.
SVG Tagged Template Function.
Send a signal to process under given pid
. The value and meaning of thesignal
to the process is operating system and process dependant.Signal
provides the most common signals. Default signalis "SIGTERM"
.
Consistency level of a KV operation.
An optional versioned pair of key and value in a Deno.Kv
.
A key to be persisted in a Deno.Kv
. A key is a sequenceof Deno.KvKeyPart
s.
A single part of a Deno.KvKey
. Parts are orderedlexicographically, first by their type, and within a given type by theirvalue.
Options for listing key-value pairs in a Deno.Kv
.
A selector that selects the range of data returned by a list operation on aDeno.Kv
.
A mutation to a key in a Deno.Kv
. A mutation is acombination of a key, a value, and a type. The type determines how themutation is applied to the key.
Creates newpath
as a hard link to oldpath
.
Synchronously creates newpath
as a hard link to oldpath
.
Listen announces on the local transport address.
Listen announces on the local transport address.
Listen announces on the local transport address over TLS (transport layersecurity).
Returns an array containing the 1, 5, and 15 minute load averages. Theload average is a measure of CPU and IO utilization of the last one, five,and 15 minute periods expressed as a fractional number. Zero means thereis no load. On Windows, the three values are always the same and representthe current load, not the 1, 5 and 15 minute load averages.
Resolves to a Deno.FileInfo
for the specified path
. Ifpath
is a symlink, information for the symlink will be returned insteadof what it points to.
Synchronously returns a Deno.FileInfo
for the specifiedpath
. If path
is a symlink, information for the symlink will bereturned instead of what it points to.
The URL of the entrypoint module entered from the command-line. Itrequires read permission to the CWD.
Creates a new temporary directory in the default directory for temporaryfiles, unless dir
is specified. Other optional options includeprefixing and suffixing the directory name with prefix
and suffix
respectively.
Synchronously creates a new temporary directory in the default directoryfor temporary files, unless dir
is specified. Other optional optionsinclude prefixing and suffixing the directory name with prefix
andsuffix
respectively.
Creates a new temporary file in the default directory for temporaryfiles, unless dir
is specified.
Synchronously creates a new temporary file in the default directory fortemporary files, unless dir
is specified.
Options which can be set when using Deno.makeTempDir
,Deno.makeTempDirSync
, Deno.makeTempFile
, andDeno.makeTempFileSync
.
Returns an object describing the memory usage of the Deno process and theV8 subsystem measured in bytes.
Creates a new directory with the specified path.
Synchronously creates a new directory with the specified path.
If Deno.resolveDns
is called with "MX"
record typespecified, it will return an array of objects with this interface.
If Deno.resolveDns
is called with "NAPTR"
record typespecified, it will return an array of objects with this interface.
All BigInt number types for interfacing with foreign functions.
The native boolean type for interfacing to foreign functions.
The native buffer type for interfacing to foreign functions.
The native function type for interfacing with foreign functions.
All plain number types for interfacing with foreign functions.
The native pointer type for interfacing to foreign functions.
All supported types for interfacing with foreign functions.
The native void type for interfacing with foreign functions.
The permission descriptor for the allow-net
and deny-net
permissions, which controlsaccess to opening network ports and connecting to remote hosts via thenetwork. The option host
allows scoping the permission for outboundconnection to a specific host and port.
The information for a network interface returned from a call toDeno.networkInterfaces
.
Returns an array of the network interface information.
Reflects the NO_COLOR
environment variable at program start.
Open a file and resolve to an instance of Deno.FsFile
. Thefile does not need to previously exist if using the create
or createNew
open options. The caller may have the resulting file automatically closedby the runtime once it's out of scope by declaring the file variable withthe using
keyword.
Open a new Deno.Kv
connection to persist data.
Options which can be set when doing Deno.open
andDeno.openSync
.
Synchronously open a file and return an instance ofDeno.FsFile
. The file does not need to previously exist ifusing the create
or createNew
open options. The caller may have theresulting file automatically closed by the runtime once it's out of scopeby declaring the file variable with the using
keyword.
Returns the release version of the Operating System.
Returns the Operating System uptime in number of seconds.
Permission descriptors which define a permission and can be queried,requested, or revoked.
The name of a privileged feature which needs permission.
Options which define the permissions within a test or worker context.
Deno's permission management API.
The current status of the permission:
An EventTarget
returned from the Deno.permissions
API which can provide updates to any state changes of the permission.
The interface which defines what event types are supported byPermissionStatus
instances.
The current process ID of this instance of the Deno CLI.
A non-null pointer, represented as an objectat runtime. The object's prototype is null
and cannot be changed. The object cannot beassigned to either and is thus entirely read-only.
Pointers are represented either with a PointerObject
object or a null
if the pointer is null.
The process ID of parent process of this instance of the Deno CLI.
Reads the directory given by path
and returns an async iterable ofDeno.DirEntry
. The order of entries is not guaranteed.
Synchronously reads the directory given by path
and returns an iterableof Deno.DirEntry
. The order of entries is not guaranteed.
Reads and resolves to the entire contents of a file as an array of bytes.TextDecoder
can be used to transform the bytes to string if required.Reading a directory returns an empty data array.
Synchronously reads and returns the entire contents of a file as an arrayof bytes. TextDecoder
can be used to transform the bytes to string ifrequired. Reading a directory returns an empty data array.
Resolves to the full path destination of the named symbolic link.
Synchronously returns the full path destination of the named symboliclink.
The permission descriptor for the allow-read
and deny-read
permissions, which controlsaccess to reading resources from the local host. The option path
allowsscoping the permission to a specific path (and if the path is a directoryany sub paths).
Asynchronously reads and returns the entire contents of a file as an UTF-8decoded string. Reading a directory throws an error.
Synchronously reads and returns the entire contents of a file as an UTF-8decoded string. Reading a directory throws an error.
Resolves to the absolute normalized path, with symbolic links resolved.
Synchronously returns absolute normalized path, with symbolic linksresolved.
The type of the resource record to resolve via DNS usingDeno.resolveDns
.
Make the timer of the given id
block the event loop from finishing.
Removes the named file or directory.
Removes the given signal listener that has been registered withDeno.addSignalListener
.
Synchronously removes the named file or directory.
Renames (moves) oldpath
to newpath
. Paths may be files or directories.If newpath
already exists and is not a directory, rename()
replaces it.OS-specific restrictions may apply when oldpath
and newpath
are indifferent directories.
Synchronously renames (moves) oldpath
to newpath
. Paths may be files ordirectories. If newpath
already exists and is not a directory,renameSync()
replaces it. OS-specific restrictions may apply whenoldpath
and newpath
are in different directories.
Performs DNS resolution against the given query, returning resolvedrecords.
The permission descriptor for the allow-run
and deny-run
permissions, which controlsaccess to what sub-processes can be executed by Deno. The option command
allows scoping the permission to a specific executable.
A enum which defines the seek mode for IO related APIs that supportseeking.
Serves HTTP requests with the given handler.
A handler for HTTP requests. Consumes a request and returns a response.
Additional information for an HTTP request and its connection.
Options that can be passed to Deno.serve
to create a server listening ona TCP port.
Options that can be passed to Deno.serve
to create a server listening ona Unix domain socket.
Operating signals which can be listened for or sent to sub-processes. Whatsignals and what their standard behaviors are OS dependent.
If Deno.resolveDns
is called with "SOA"
record typespecified, it will return an array of objects with this interface.
If Deno.resolveDns
is called with "SRV"
record typespecified, it will return an array of objects with this interface.
Start TLS handshake from an existing connection using an optional list ofCA certificates, and hostname (default is "127.0.0.1"). Specifying CA certsis optional. By default the configured root certificates are used. Usingthis function requires that the other end of the connection is prepared fora TLS handshake.
Resolves to a Deno.FileInfo
for the specified path
. Willalways follow symlinks.
A utility type that infers a foreign library interface.
A utility type that infers a foreign symbol.
Synchronously returns a Deno.FileInfo
for the specifiedpath
. Will always follow symlinks.
A reference to stderr
which can be used to write directly to stderr
.It implements the Deno specificWriter
,WriterSync
,and Closer
interfaces as well as provides aWritableStream
interface.
A reference to stdin
which can be used to read directly from stdin
.
A reference to stdout
which can be used to write directly to stdout
.It implements the Deno specificWriter
,WriterSync
,and Closer
interfaces as well as provides aWritableStream
interface.
Creates newpath
as a symbolic link to oldpath
.
Creates newpath
as a symbolic link to oldpath
.
The permission descriptor for the allow-sys
and deny-sys
permissions, which controlsaccess to sensitive host system information, which malicious code mightattempt to exploit. The option kind
allows scoping the permission to aspecific piece of information.
Information returned from a call to Deno.systemMemoryInfo
.
Displays the total amount of free and used physical and swap memory in thesystem, as well as the buffers and caches used by the kernel.
Specialized listener that accepts TCP connections.
Register a test which will be run when deno test
is used on the commandline and the containing module looks like a test module.
Context that is passed to a testing function, which can be used to eithergain information about the current test, or register additional teststeps within the current test.
Provides certified key material from strings. The key material is provided inPEM
-format (Privacy Enhanced Mail, https://www.rfc-editor.org/rfc/rfc1422) which can be identified by having-----BEGIN-----
and -----END-----
markers at the beginning and end of the strings. This type of key is not compatiblewith DER
-format keys which are binary.
Specialized listener that accepts TLS connections.
A utility type for conversion of parameter types of foreign functions.
Type conversion for unsafe callback return types.
Type conversion for foreign symbol parameters and unsafe callback returntypes.
Truncates (or extends) the specified file, to reach the specified len
.If len
is not specified then the entire file contents are truncated.
Synchronously truncates (or extends) the specified file, to reach thespecified len
. If len
is not specified then the entire file contentsare truncated.
Unstable options which can be set when opening a datagram listener viaDeno.listenDatagram
.
Returns the user id of the process on POSIX platforms. Returns null on Windows.
Retrieve the process umask. If mask
is provided, sets the process umask.This call always returns what the umask was before the call.
Specialized listener that accepts Unix connections.
Options which can be set when opening a Unix listener viaDeno.listen
or Deno.listenDatagram
.
Make the timer of the given id
not block the event loop from finishing.
An unsafe function pointer for passing JavaScript functions as C functionpointers to foreign function calls.
An unsafe callback function.
An unsafe pointer to a function, for calling functions that are not presentas symbols.
An unsafe pointer view to a memory location as specified by the pointer
value. The UnsafePointerView
API follows the standard built in interfaceDataView
for accessing the underlying types at an memorylocation (numbers, strings and raw bytes).
Creates a presentable WebGPU surface from given window anddisplay handles.
Upgrade an incoming HTTP request to a WebSocket.
Options which can be set when performing aDeno.upgradeWebSocket
upgrade of a Request
Changes the access (atime
) and modification (mtime
) times of a filesystem object referenced by path
. Given times are either in seconds(UNIX epoch time) or as Date
objects.
Synchronously changes the access (atime
) and modification (mtime
) timesof a file system object referenced by path
. Given times are either inseconds (UNIX epoch time) or as Date
objects.
Version information related to the current Deno CLI runtime environment.
Watch for file system events against one or more paths
, which can befiles or directories. These paths must exist already. One user action (e.g.touch test.file
) can generate multiple file system events. Likewise,one user action can result in multiple file paths in one event (e.g. mv old_name.txt new_name.txt
).
The object that is returned from a Deno.upgradeWebSocket
request.
Write data
to the given path
, by default creating a new file ifneeded, else overwriting.
Synchronously write data
to the given path
, by default creating a newfile if needed, else overwriting.
The permission descriptor for the allow-write
and deny-write
permissions, whichcontrols access to writing to resources from the local host. The optionpath
allow scoping the permission to a specific path (and if the path isa directory any sub paths).
Write string data
to the given path
, by default creating a new file ifneeded, else overwriting.
Synchronously write string data
to the given path
, by default creatinga new file if needed, else overwriting.