import { Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
The global namespace where Deno specific, non-standard APIs are located.
Namespaces
A set of error constructors that are raised by Deno APIs. |
Classes
The interface for handling a child process returned from
| |
Create a child process. | |
Raised when attempting to open a server listener on an address and port that already has a listener. | |
Raised when the underlying operating system reports an | |
Raised when trying to create a resource, like a file, that already exits. | |
The underlying IO resource is invalid or closed, and so the operation could 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 | |
Raised when the underlying IO resource is not available because it is being awaited on in another block of code. | |
Raised when the underlying operating system reports an | |
Raised when the underlying operating system reports that a connection to a resource is refused. | |
Raised when the underlying operating system reports that a connection has been reset. With network servers, it can be a normal occurrence where a client will abort a connection instead of properly shutting it down. | |
Raised when too many symbolic links were encountered when resolving the filename. | |
Raised in situations where when attempting to load a dynamic import, too many redirects were encountered. | |
Raised when the underlying operating system reports an | |
Raised when an operation to returns data that is invalid for the operation being performed. | |
Raised when trying to open, create or write to a directory. | |
Raised when performing a socket operation but the remote host is not reachable. | |
Raised when trying to perform an operation on a path that is not a directory, when directory is required. | |
Raised when trying to perform an operation while the relevant Deno
permission (like | |
Raised when the underlying operating system reports an | |
Raised when the underlying operating system indicates that the file was not found. | |
Raised when the underlying Deno API is asked to perform a function that is not currently supported. | |
Raised when the underlying operating system indicates the current user which the Deno process is running under does not have the appropriate permissions to a file or resource. | |
Raised when the underlying operating system reports that an I/O operation
has timed out ( | |
Raised when attempting to read bytes from a resource, but the EOF was unexpectedly encountered. | |
Raised when the underlying operating system would need to block to complete but an asynchronous (non-blocking) API is used. | |
Raised when expecting to write to a IO buffer resulted in zero bytes being written. | |
The Deno abstraction for reading and writing files. | |
A custom | |
Deno's permission management API. | |
An | |
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. | |
A collection of static functions for interacting with pointer objects. | |
An unsafe pointer view to a memory location as specified by the |
Enums
A enum which defines the seek mode for IO related APIs that support seeking. |
Variables
Returns the script arguments to the program. | |
Information related to the build of the current Deno runtime. | |
An interface containing methods to interact with the process environment variables. | |
The exit code for the Deno process. | |
The URL of the entrypoint module entered from the command-line. It requires read permission to the CWD. | |
Reflects the | |
Deno's permission management API. | |
The current process ID of this instance of the Deno CLI. | |
The process ID of parent process of this instance of the Deno CLI. | |
A reference to | |
A reference to | |
A reference to | |
Register a test which will be run when | |
Version information related to the current Deno CLI runtime environment. |
Functions
Registers the given function as a listener of the given signal event. | |
Register a benchmark test which will be run when | |
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 of specified path. Ignores the process's umask. | |
Change owner of a regular file or directory. | |
Synchronously change owner of a regular file or directory. | |
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 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 | |
Create a custom HttpClient to use with | |
Creates a file if none exists or truncates an existing file and returns
an instance of | |
Return a string representing the current working directory. | |
Opens an external dynamic library and registers symbols, making foreign functions available to be called. | |
Returns the path to the current deno executable. | |
Exit the Deno process with optional exit code. | |
Returns the group id of the process on POSIX platforms. Returns null on windows. | |
Get the | |
Converts the input into a string that has the same format as printed by
| |
Send a signal to process under given | |
Creates | |
Synchronously creates | |
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 | |
Synchronously returns a | |
Creates a new temporary directory in the default directory for temporary
files, unless | |
Synchronously creates a new temporary directory in the default directory
for temporary files, unless | |
Creates a new temporary file in the default directory for temporary
files, unless | |
Synchronously creates a new temporary file in the default directory for
temporary files, unless | |
Returns an object describing the memory usage of the Deno process and the V8 subsystem measured in bytes. | |
Creates a new directory with the specified path. | |
Synchronously creates a new directory with the specified path. | |
Returns an array of the network interface information. | |
Open a file and resolve to an instance of | |
Synchronously open a file and return an instance of
| |
Returns the release version of the Operating System. | |
Returns the Operating System uptime in number of seconds. | |
Reads the directory given by | |
Synchronously reads the directory given by | |
Reads and resolves to the entire contents of a file as an array of bytes.
| |
Synchronously reads and returns the entire contents of a file as an array
of bytes. | |
Resolves to the full path destination of the named symbolic link. | |
Synchronously returns the full path destination of the named symbolic link. | |
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. | |
Resolves to the absolute normalized path, with symbolic links resolved. | |
Synchronously returns absolute normalized path, with symbolic links resolved. | |
Make the timer of the given | |
Removes the named file or directory. | |
Removes the given signal listener that has been registered with
| |
Synchronously removes the named file or directory. | |
Renames (moves) | |
Synchronously renames (moves) | |
Performs DNS resolution against the given query, returning resolved records. | |
Serves HTTP requests with the given handler. | |
Resolves to a | |
Synchronously returns a | |
Creates | |
Creates | |
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 | |
Synchronously truncates (or extends) the specified file, to reach the
specified | |
Returns the user id of the process on POSIX platforms. Returns null on Windows. | |
Retrieve the process umask. If | |
Make the timer of the given | |
Upgrade an incoming HTTP request to a WebSocket. | |
Changes the access ( | |
Synchronously changes the access ( | |
Watch for file system events against one or more | |
Write | |
Synchronously write | |
Write string | |
Synchronously write string |
Interfaces
Basic authentication credentials to be used with a | |
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 | |
If | |
Options which can be set when calling | |
The interface returned from calling | |
The options used when creating a | |
Information about a directory entry returned from | |
A dynamic library resource. Use | |
An interface containing methods to interact with the process environment variables. | |
The permission descriptor for the | |
The permission descriptor for the | |
Provides information about a file and is returned by
| |
The interface for a foreign function as defined by its parameter and result types. | |
A foreign library interface descriptor. | |
Represents a unique file system event yielded by a
| |
Returned by | |
An instance of the server created using | |
Option which can be specified when performing | |
Options which can be set when using | |
Options which can be set when using | |
If | |
If | |
The native struct type for interfacing with foreign functions. | |
The permission descriptor for the | |
The information for a network interface returned from a call to
| |
Options which can be set when doing | |
A set of options which can define the permissions within a test or worker context at a highly specific level. | |
The interface which defines what event types are supported by
| |
A non-null pointer, represented as an object
at runtime. The object's prototype is | |
The definition of a proxy when specifying
| |
Options which can be set when using | |
The permission descriptor for the | |
Options which can be set when using | |
Options which can be set when using | |
The permission descriptor for the | |
Interface that module run with | |
Additional information for an HTTP request and its connection. | |
Options which can be set when calling | |
Options that can be passed to | |
Options that can be passed to | |
If | |
If | |
Options that can be used with | |
The permission descriptor for the | |
Information returned from a call to | |
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. | |
Definition of a unsafe callback function. | |
Options which can be set when performing a
| |
The object that is returned from a | |
Options for writing to a file. | |
The permission descriptor for the |
Type Aliases
Type conversion for foreign symbol return types. | |
Type conversion for foreign symbol return types and unsafe callback parameters. | |
Additional information for FsEvent objects with the "other" kind. | |
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. | |
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. | |
The current status of the permission: | |
Pointers are represented either with a | |
The type of the resource record to resolve via DNS using
| |
A handler for HTTP requests. Consumes a request and returns a response. | |
Operating signals which can be listened for or sent to sub-processes. What signals and what their standard behaviors are OS dependent. | |
A utility type that infers a foreign library interface. | |
A utility type that infers a foreign symbol. | |
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 return types. | |
An unsafe callback function. |