The global namespace where Deno specific, non-standard APIs are located.
A custom HttpClient
for use with fetch
function. This is
designed to allow custom certificates or proxies to be used with fetch()
.
An EventTarget
returned from the Deno.permissions
API which can provide updates to any state changes of the permission.
An unsafe function pointer for passing JavaScript functions as C function pointers to foreign function calls.
An unsafe pointer to a function, for calling functions that are not present as symbols.
An unsafe pointer view to a memory location as specified by the pointer
value. The UnsafePointerView
API follows the standard built in interface
DataView
for accessing the underlying types at an memory
location (numbers, strings and raw bytes).
Creates a presentable WebGPU surface from given window and display handles.
Register a benchmark test which will be run when deno bench
is used on
the command line and the containing module looks like a bench module.
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 of specified path. Ignores the process's umask.
Connects to the hostname (default is "127.0.0.1") and port on the named
transport (default is "tcp"), and resolves to the connection (Conn
).
Establishes a secure connection over QUIC using a hostname and port. The cert file is optional and if not included Mozilla's root certificates will be used. See also https://github.com/ctz/webpki-roots for specifics.
Establishes a secure connection over TLS (transport layer security) using an optional list of CA certs, hostname (default is "127.0.0.1") and port.
Copies the contents and permissions of one file to another specified path, by default creating a new file if needed, else overwriting. Fails if target path is a directory or is unwritable.
Synchronously copies the contents and permissions of one file to another specified 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 to
an instance of Deno.FsFile
.
Create a custom HttpClient to use with fetch
. This is an
extension of the web platform Fetch API which allows Deno to use custom
TLS CA certificates and connect via a proxy while using fetch()
.
Creates a file if none exists or truncates an existing file and returns
an instance of Deno.FsFile
.
Create a cron job that will periodically execute the provided handler callback based on the specified schedule.
Opens an external dynamic library and registers symbols, making foreign functions available to be called.
Returns an array containing the 1, 5, and 15 minute load averages. The load 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 there is no load. On Windows, the three values are always the same and represent the current load, not the 1, 5 and 15 minute load averages.
Resolves to a Deno.FileInfo
for the specified path
. If
path
is a symlink, information for the symlink will be returned instead
of what it points to.
Synchronously returns a Deno.FileInfo
for the specified
path
. If path
is a symlink, information for the symlink will be
returned instead of what it points to.
Creates a new temporary directory in the default directory for temporary
files, unless dir
is specified. Other optional options include
prefixing and suffixing the directory name with prefix
and suffix
respectively.
Synchronously creates a new temporary directory in the default directory
for temporary files, unless dir
is specified. Other optional options
include prefixing and suffixing the directory name with prefix
and
suffix
respectively.
Creates a new temporary file in the default directory for temporary
files, unless dir
is specified.
Synchronously creates a new temporary file in the default directory for
temporary files, unless dir
is specified.
Returns an object describing the memory usage of the Deno process and the V8 subsystem measured in bytes.
Open a file and resolve to an instance of Deno.FsFile
. The
file does not need to previously exist if using the create
or createNew
open options. The caller may have the resulting file automatically closed
by the runtime once it's out of scope by declaring the file variable with
the using
keyword.
Synchronously open a file and return an instance of
Deno.FsFile
. The file does not need to previously exist if
using the create
or createNew
open options. The caller may have the
resulting file automatically closed by the runtime once it's out of scope
by declaring the file variable with the using
keyword.
Reads the directory given by path
and returns an async iterable of
Deno.DirEntry
. The order of entries is not guaranteed.
Synchronously reads the directory given by path
and returns an iterable
of 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 array
of bytes. TextDecoder
can be used to transform the bytes to string if
required. Reading a directory returns an empty data array.
Asynchronously reads and returns the entire contents of a file as an UTF-8 decoded string. Reading a directory throws an error.
Synchronously reads and returns the entire contents of a file as an UTF-8 decoded string. Reading a directory throws an error.
Removes the given signal listener that has been registered with
Deno.addSignalListener
.
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 in
different directories.
Synchronously renames (moves) oldpath
to newpath
. Paths may be files or
directories. If newpath
already exists and is not a directory,
renameSync()
replaces it. OS-specific restrictions may apply when
oldpath
and newpath
are in different directories.
Start TLS handshake from an existing connection using an optional list of CA certificates, and hostname (default is "127.0.0.1"). Specifying CA certs is optional. By default the configured root certificates are used. Using this function requires that the other end of the connection is prepared for a TLS handshake.
Synchronously returns a Deno.FileInfo
for the specified
path
. Will always follow symlinks.
Displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel.
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 the
specified len
. If len
is not specified then the entire file contents
are truncated.
Retrieve the process umask. If mask
is provided, sets the process umask.
This call always returns what the umask was before the call.
Changes the access (atime
) and modification (mtime
) times of a file
system 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
) times
of a file system object referenced by path
. Given times are either in
seconds (UNIX epoch time) or as Date
objects.
Watch for file system events against one or more paths
, which can be
files 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
).
Write data
to the given path
, by default creating a new file if
needed, else overwriting.
Synchronously write data
to the given path
, by default creating a new
file if needed, else overwriting.
Write string data
to the given path
, by default creating a new file if
needed, else overwriting.
Synchronously write string data
to the given path
, by default creating
a new file if needed, else overwriting.
A check to perform as part of a Deno.AtomicOperation
. The check
will fail if the versionstamp for the key-value pair in the KV store does
not match the given versionstamp. A check with a null
versionstamp checks
that 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
.
Context that is passed to a benchmarked function. The instance is shared between iterations of the benchmark. Its methods can be used for example to 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 type
specified, it will resolve with an array of objects with this interface.
Options which can be set when calling Deno.Command
.
The interface returned from calling Deno.Command.output
or
Deno.Command.outputSync
which represents the result of spawning the
child process.
The options used when creating a Deno.HttpClient
.
CronSchedule is the interface used for JSON format
cron schedule
.
A generic transport listener for message-oriented protocols.
Information about a directory entry returned from Deno.readDir
and Deno.readDirSync
.
A dynamic library resource. Use Deno.dlopen
to load a dynamic
library and return this interface.
The permission descriptor for the allow-env
and deny-env
permissions, which controls
access to being able to read and write to the process environment variables
as well as access other information about the environment. The option
variable
allows scoping the permission to a specific environment
variable.
The permission descriptor for the allow-ffi
and deny-ffi
permissions, which controls
access to loading foreign code and interfacing with it via the
Foreign Function Interface API
available in Deno. The option path
allows scoping the permission to a
specific path on the host.
Provides information about a file and is returned by
Deno.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 result types.
Returned by Deno.watchFs
. It is an async iterator yielding up
system events. To stop watching the file system by calling .close()
method.
Option which can be specified when performing Deno.inspect
.
Options for listing key-value pairs in a Deno.Kv
.
Options which can be set when using Deno.makeTempDir
,
Deno.makeTempDirSync
, Deno.makeTempFile
, and
Deno.makeTempFileSync
.
If Deno.resolveDns
is called with "MX"
record type
specified, it will return an array of objects with this interface.
If Deno.resolveDns
is called with "NAPTR"
record type
specified, it will return an array of objects with this interface.
The permission descriptor for the allow-net
and deny-net
permissions, which controls
access to opening network ports and connecting to remote hosts via the
network. The option host
allows scoping the permission for outbound
connection to a specific host and port.
The information for a network interface returned from a call to
Deno.networkInterfaces
.
Options which can be set when doing Deno.open
and
Deno.openSync
.
The interface which defines what event types are supported by
PermissionStatus
instances.
A non-null pointer, represented as an object
at runtime. The object's prototype is null
and cannot be changed. The object cannot be
assigned to either and is thus entirely read-only.
An incoming connection for which the server has not yet begun its part of the handshake.
The permission descriptor for the allow-read
and deny-read
permissions, which controls
access to reading resources from the local host. The option path
allows
scoping the permission to a specific path (and if the path is a directory
any sub paths).
The permission descriptor for the allow-run
and deny-run
permissions, which controls
access to what sub-processes can be executed by Deno. The option command
allows scoping the permission to a specific executable.
Additional information for an HTTP request and its connection.
Options that can be passed to Deno.serve
to create a server listening on
a TCP port.
Options that can be passed to Deno.serve
to create a server listening on
a Unix domain socket.
If Deno.resolveDns
is called with "SOA"
record type
specified, it will return an array of objects with this interface.
If Deno.resolveDns
is called with "SRV"
record type
specified, it will return an array of objects with this interface.
The permission descriptor for the allow-sys
and deny-sys
permissions, which controls
access to sensitive host system information, which malicious code might
attempt to exploit. The option kind
allows scoping the permission to a
specific piece of information.
Information returned from a call to Deno.systemMemoryInfo
.
Context that is passed to a testing function, which can be used to either gain information about the current test, or register additional test steps within the current test.
Provides certified key material from strings. The key material is provided in
PEM
-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 compatible
with DER
-format keys which are binary.
Unstable options which can be set when opening a datagram listener via
Deno.listenDatagram
.
Options which can be set when opening a Unix listener via
Deno.listen
or Deno.listenDatagram
.
Options which can be set when performing a
Deno.upgradeWebSocket
upgrade of a Request
The object that is returned from a Deno.upgradeWebSocket
request.
The permission descriptor for the allow-write
and deny-write
permissions, which
controls access to writing to resources from the local host. The option
path
allow scoping the permission to a specific path (and if the path is
a directory any sub paths).
APIs for working with the OpenTelemetry observability framework. Deno can export traces, metrics, and logs to OpenTelemetry compatible backends via the OTLP protocol.
CronScheduleExpression is used as the type of minute
, hour
,
dayOfMonth
, month
, and dayOfWeek
in CronSchedule
.
A single part of a Deno.KvKey
. Parts are ordered
lexicographically, first by their type, and within a given type by their
value.
A selector that selects the range of data returned by a list operation on a
Deno.Kv
.
A mutation to a key in a Deno.Kv
. A mutation is a
combination of a key, a value, and a type. The type determines how the
mutation is applied to the key.
Permission descriptors which define a permission and can be queried, requested, or revoked.
Pointers are represented either with a PointerObject
object or a null
if the pointer is null.
Operating signals which can be listened for or sent to sub-processes. What signals and what their standard behaviors are OS dependent.
The URL of the entrypoint module entered from the command-line. It requires read permission to the CWD.
A reference to stderr
which can be used to write directly to stderr
.
It implements the Deno specific
Writer
,
WriterSync
,
and Closer
interfaces as well as provides a
WritableStream
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 specific
Writer
,
WriterSync
,
and Closer
interfaces as well as provides a
WritableStream
interface.
Register a test which will be run when deno test
is used on the command
line and the containing module looks like a test module.
Version information related to the current Deno CLI runtime environment.