Deno APIs reference
Deno APIs
Every API in the global Deno namespace, by category. Use your browser's find-in-page to locate a symbol, then click through for full documentation.
Bundle
- Deno.bundlef
Bundle Typescript/Javascript code
Bundler
- Deno.bundle.MessageI
A message emitted from the bundler.
- Deno.bundle.MessageLocationI
The location of a message.
- Deno.bundle.MessageNoteI
A note about a message.
- Deno.bundle.OptionsI
Options for the bundle.
- Deno.bundle.OutputFileI
An output file in the bundle.
- Deno.bundle.ResultI
The result of bundling.
- Deno.bundleN
- Deno.bundle.FormatT
The output format of the bundle.
- Deno.bundle.PackageHandlingT
How to handle packages.
- Deno.bundle.PlatformT
The target platform of the bundle.
- Deno.bundle.SourceMapTypeT
The source map type of the bundle.
Cloud
- Deno.AtomicOperationc
An operation on a
Deno.Kvthat can be performed atomically. Atomic operations do not auto-commit, and must be committed explicitly by calling thecommitmethod. - Deno.Kvc
A key-value database that can be used to store and retrieve data.
- Deno.KvListIteratorc
An iterator over a range of data entries in a
Deno.Kv. - Deno.KvU64c
Wrapper type for 64-bit unsigned integers for use as values in a
Deno.Kv. - Deno.cronf
Create a cron job that will periodically execute the provided handler callback based on the specified schedule.
- Deno.openKvf
Open a new
Deno.Kvconnection to persist data. - Deno.AtomicCheckI
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 anullversionstamp checks that the key-value pair does not currently exist in the KV store. - Deno.CronScheduleI
CronSchedule is the interface used for JSON format cron
schedule. - Deno.KvCommitErrorI
- Deno.KvCommitResultI
- Deno.KvEntryI
A versioned pair of key and value in a
Deno.Kv. - Deno.KvListOptionsI
Options for listing key-value pairs in a
Deno.Kv. - Deno.CronScheduleExpressionT
CronScheduleExpression is used as the type of
minute,hour,dayOfMonth,month, anddayOfWeekinCronSchedule. - Deno.KvConsistencyLevelT
Consistency level of a KV operation.
- Deno.KvEntryMaybeT
An optional versioned pair of key and value in a
Deno.Kv. - Deno.KvKeyT
A key to be persisted in a
Deno.Kv. A key is a sequence ofDeno.KvKeyParts. - Deno.KvKeyPartT
A single part of a
Deno.KvKey. Parts are ordered lexicographically, first by their type, and within a given type by their value. - Deno.KvListSelectorT
A selector that selects the range of data returned by a list operation on a
Deno.Kv. - Deno.KvMutationT
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.
Errors
- Deno.errors.AddrInUsec
Raised when attempting to open a server listener on an address and port that already has a listener.
- Deno.errors.AddrNotAvailablec
Raised when the underlying operating system reports an
EADDRNOTAVAILerror. - Deno.errors.AlreadyExistsc
Raised when trying to create a resource, like a file, that already exits.
- Deno.errors.BadResourcec
The underlying IO resource is invalid or closed, and so the operation could not be performed.
- Deno.errors.BrokenPipec
Raised when trying to write to a resource and a broken pipe error occurs. This can happen when trying to write directly to
stdoutorstderrand the operating system is unable to pipe the output for a reason external to the Deno runtime. - Deno.errors.Busyc
Raised when the underlying IO resource is not available because it is being awaited on in another block of code.
- Deno.errors.ConnectionAbortedc
Raised when the underlying operating system reports an
ECONNABORTEDerror. - Deno.errors.ConnectionRefusedc
Raised when the underlying operating system reports that a connection to a resource is refused.
- Deno.errors.ConnectionResetc
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.
- Deno.errors.FilesystemLoopc
Raised when too many symbolic links were encountered when resolving the filename.
- Deno.errors.Httpc
Raised in situations where when attempting to load a dynamic import, too many redirects were encountered.
- Deno.errors.Interruptedc
Raised when the underlying operating system reports an
EINTRerror. In many cases, this underlying IO error will be handled internally within Deno, or result in an BadResource error instead. - Deno.errors.InvalidDatac
Raised when an operation returns data that is invalid for the operation being performed.
- Deno.errors.IsADirectoryc
Raised when trying to open, create or write to a directory.
- Deno.errors.NetworkUnreachablec
Raised when performing a socket operation but the remote host is not reachable.
- Deno.errors.NotADirectoryc
Raised when trying to perform an operation on a path that is not a directory, when directory is required.
- Deno.errors.NotCapablec
Raised when trying to perform an operation while the relevant Deno permission (like
--allow-read) has not been granted. - Deno.errors.NotConnectedc
Raised when the underlying operating system reports an
ENOTCONNerror. - Deno.errors.NotFoundc
Raised when the underlying operating system indicates that the file was not found.
- Deno.errors.NotSupportedc
Raised when the underlying Deno API is asked to perform a function that is not currently supported.
- Deno.errors.PermissionDeniedc
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.
- Deno.errors.TimedOutc
Raised when the underlying operating system reports that an I/O operation has timed out (
ETIMEDOUT). - Deno.errors.UnexpectedEofc
Raised when attempting to read bytes from a resource, but the EOF was unexpectedly encountered.
- Deno.errors.WouldBlockc
Raised when the underlying operating system would need to block to complete but an asynchronous (non-blocking) API is used.
- Deno.errors.WriteZeroc
Raised when expecting to write to a IO buffer resulted in zero bytes being written.
- Deno.errorsN
A set of error constructors that are raised by Deno APIs.
Fetch
- Deno.HttpClientc
A custom
HttpClientfor use withfetchfunction. This is designed to allow custom certificates or proxies to be used withfetch(). - Deno.createHttpClientf
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 usingfetch(). - Deno.BasicAuthI
Basic authentication credentials to be used with a
Deno.Proxyserver when specifyingDeno.CreateHttpClientOptions. - Deno.CreateHttpClientOptionsI
The options used when creating a
Deno.HttpClient. - Deno.ProxyT
The definition for alternative transports (or proxies) in
Deno.CreateHttpClientOptions.
FFI
- Deno.UnsafeCallbackc
An unsafe function pointer for passing JavaScript functions as C function pointers to foreign function calls.
- Deno.UnsafeFnPointerc
An unsafe pointer to a function, for calling functions that are not present as symbols.
- Deno.UnsafePointerc
A collection of static functions for interacting with pointer objects.
- Deno.UnsafePointerViewc
An unsafe pointer view to a memory location as specified by the
pointervalue. TheUnsafePointerViewAPI follows the standard built in interfaceDataViewfor accessing the underlying types at an memory location (numbers, strings and raw bytes). - Deno.dlopenf
Opens an external dynamic library and registers symbols, making foreign functions available to be called.
- Deno.DynamicLibraryI
A dynamic library resource. Use
Deno.dlopento load a dynamic library and return this interface. - Deno.ForeignFunctionI
The interface for a foreign function as defined by its parameter and result types.
- Deno.ForeignLibraryInterfaceI
A foreign library interface descriptor.
- Deno.ForeignStaticI
- Deno.NativeStructTypeI
The native struct type for interfacing with foreign functions.
- Deno.PointerObjectI
A non-null pointer, represented as an object at runtime. The object's prototype is
nulland cannot be changed. The object cannot be assigned to either and is thus entirely read-only. - Deno.UnsafeCallbackDefinitionI
Definition of a unsafe callback function.
- Deno.ConditionalAsyncT
- Deno.FromForeignFunctionT
- Deno.FromNativeParameterTypesT
- Deno.FromNativeResultTypeT
Type conversion for foreign symbol return types.
- Deno.FromNativeTypeT
Type conversion for foreign symbol return types and unsafe callback parameters.
- Deno.NativeBigIntTypeT
All BigInt number types for interfacing with foreign functions.
- Deno.NativeBooleanTypeT
The native boolean type for interfacing to foreign functions.
- Deno.NativeBufferTypeT
The native buffer type for interfacing to foreign functions.
- Deno.NativeFunctionTypeT
The native function type for interfacing with foreign functions.
- Deno.NativeI16EnumT
- Deno.NativeI32EnumT
- Deno.NativeI8EnumT
- Deno.NativeNumberTypeT
All plain number types for interfacing with foreign functions.
- Deno.NativePointerTypeT
The native pointer type for interfacing to foreign functions.
- Deno.NativeResultTypeT
- Deno.NativeTypeT
All supported types for interfacing with foreign functions.
- Deno.NativeTypedFunctionT
- Deno.NativeTypedPointerT
- Deno.NativeU16EnumT
- Deno.NativeU32EnumT
- Deno.NativeU8EnumT
- Deno.NativeVoidTypeT
The native void type for interfacing with foreign functions.
- Deno.PointerValueT
Pointers are represented either with a
PointerObjectobject or anullif the pointer is null. - Deno.StaticForeignLibraryInterfaceT
A utility type that infers a foreign library interface.
- Deno.StaticForeignSymbolT
A utility type that infers a foreign symbol.
- Deno.StaticForeignSymbolReturnTypeT
- Deno.ToNativeParameterTypesT
A utility type for conversion of parameter types of foreign functions.
- Deno.ToNativeResultTypeT
Type conversion for unsafe callback return types.
- Deno.ToNativeTypeT
Type conversion for foreign symbol parameters and unsafe callback return types.
- Deno.UnsafeCallbackFunctionT
An unsafe callback function.
- Deno.brandv
File System
- Deno.FsFilec
The Deno abstraction for reading and writing files.
- Deno.chmodf
Changes the permission of a specific file/directory of specified path. Ignores the process's umask.
- Deno.chmodSyncf
Synchronously changes the permission of a specific file/directory of specified path. Ignores the process's umask.
- Deno.chownf
Change owner of a regular file or directory.
- Deno.chownSyncf
Synchronously change owner of a regular file or directory.
- Deno.copyFilef
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.
- Deno.copyFileSyncf
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.
- Deno.createf
Creates a file if none exists or truncates an existing file and resolves to an instance of
Deno.FsFile. - Deno.createSyncf
Creates a file if none exists or truncates an existing file and returns an instance of
Deno.FsFile. - Deno.linkf
Creates
newpathas a hard link tooldpath. - Deno.linkSyncf
Synchronously creates
newpathas a hard link tooldpath. - Deno.lstatf
Resolves to a
Deno.FileInfofor the specifiedpath. Ifpathis a symlink, information for the symlink will be returned instead of what it points to. - Deno.lstatSyncf
Synchronously returns a
Deno.FileInfofor the specifiedpath. Ifpathis a symlink, information for the symlink will be returned instead of what it points to. - Deno.makeTempDirf
Creates a new temporary directory in the default directory for temporary files, unless
diris specified. Other optional options include prefixing and suffixing the directory name withprefixandsuffixrespectively. - Deno.makeTempDirSyncf
Synchronously creates a new temporary directory in the default directory for temporary files, unless
diris specified. Other optional options include prefixing and suffixing the directory name withprefixandsuffixrespectively. - Deno.makeTempFilef
Creates a new temporary file in the default directory for temporary files, unless
diris specified. - Deno.makeTempFileSyncf
Synchronously creates a new temporary file in the default directory for temporary files, unless
diris specified. - Deno.mkdirf
Creates a new directory with the specified path.
- Deno.mkdirSyncf
Synchronously creates a new directory with the specified path.
- Deno.openf
Open a file and resolve to an instance of
Deno.FsFile. The file does not need to previously exist if using thecreateorcreateNewopen 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 theusingkeyword. - Deno.openSyncf
Synchronously open a file and return an instance of
Deno.FsFile. The file does not need to previously exist if using thecreateorcreateNewopen 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 theusingkeyword. - Deno.readDirf
Reads the directory given by
pathand returns an async iterable ofDeno.DirEntry. The order of entries is not guaranteed. - Deno.readDirSyncf
Synchronously reads the directory given by
pathand returns an iterable ofDeno.DirEntry. The order of entries is not guaranteed. - Deno.readFilef
Reads and resolves to the entire contents of a file as an array of bytes.
TextDecodercan be used to transform the bytes to string if required. Rejects with an error when reading a directory. - Deno.readFileSyncf
Synchronously reads and returns the entire contents of a file as an array of bytes.
TextDecodercan be used to transform the bytes to string if required. Throws an error when reading a directory. - Deno.readLinkf
Resolves to the full path destination of the named symbolic link.
- Deno.readLinkSyncf
Synchronously returns the full path destination of the named symbolic link.
- Deno.readTextFilef
Asynchronously reads and returns the entire contents of a file as an UTF-8 decoded string. Reading a directory throws an error.
- Deno.readTextFileSyncf
Synchronously reads and returns the entire contents of a file as an UTF-8 decoded string. Reading a directory throws an error.
- Deno.realPathf
Resolves to the absolute normalized path, with symbolic links resolved.
- Deno.realPathSyncf
Synchronously returns absolute normalized path, with symbolic links resolved.
- Deno.removef
Removes the named file or directory.
- Deno.removeSyncf
Synchronously removes the named file or directory.
- Deno.renamef
Renames (moves)
oldpathtonewpath. Paths may be files or directories. Ifnewpathalready exists and is not a directory,rename()replaces it. OS-specific restrictions may apply whenoldpathandnewpathare in different directories. - Deno.renameSyncf
Synchronously renames (moves)
oldpathtonewpath. Paths may be files or directories. Ifnewpathalready exists and is not a directory,renameSync()replaces it. OS-specific restrictions may apply whenoldpathandnewpathare in different directories. - Deno.statf
Resolves to a
Deno.FileInfofor the specifiedpath. Will always follow symlinks. - Deno.statSyncf
Synchronously returns a
Deno.FileInfofor the specifiedpath. Will always follow symlinks. - Deno.symlinkf
Creates
newpathas a symbolic link tooldpath. - Deno.symlinkSyncf
Creates
newpathas a symbolic link tooldpath. - Deno.truncatef
Truncates (or extends) the specified file, to reach the specified
len. Iflenis not specified then the entire file contents are truncated. - Deno.truncateSyncf
Synchronously truncates (or extends) the specified file, to reach the specified
len. Iflenis not specified then the entire file contents are truncated. - Deno.umaskf
Retrieve the process umask. If
maskis provided, sets the process umask. This call always returns what the umask was before the call. - Deno.utimef
Changes the access (
atime) and modification (mtime) times of a file system object referenced bypath. Given times are either in seconds (UNIX epoch time) or asDateobjects. - Deno.utimeSyncf
Synchronously changes the access (
atime) and modification (mtime) times of a file system object referenced bypath. Given times are either in seconds (UNIX epoch time) or asDateobjects. - Deno.watchFsf
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). - Deno.writeFilef
Write
datato the givenpath, by default creating a new file if needed, else overwriting. - Deno.writeFileSyncf
Synchronously write
datato the givenpath, by default creating a new file if needed, else overwriting. - Deno.writeTextFilef
Write string
datato the givenpath, by default creating a new file if needed, else overwriting. - Deno.writeTextFileSyncf
Synchronously write string
datato the givenpath, by default creating a new file if needed, else overwriting. - Deno.DirEntryI
Information about a directory entry returned from
Deno.readDirandDeno.readDirSync. - Deno.FileInfoI
Provides information about a file and is returned by
Deno.stat,Deno.lstat,Deno.statSync, andDeno.lstatSyncor from callingstat()andstatSync()on anDeno.FsFileinstance. - Deno.FsEventI
Represents a unique file system event yielded by a
Deno.FsWatcher. - Deno.FsWatcherI
Returned by
Deno.watchFs. It is an async iterator yielding up system events. To stop watching the file system by calling.close()method. - Deno.MakeTempOptionsI
Options which can be set when using
Deno.makeTempDir,Deno.makeTempDirSync,Deno.makeTempFile, andDeno.makeTempFileSync. - Deno.MkdirOptionsI
Options which can be set when using
Deno.mkdirandDeno.mkdirSync. - Deno.OpenOptionsI
Options which can be set when doing
Deno.openandDeno.openSync. - Deno.ReadFileOptionsI
Options which can be set when using
Deno.readFileorDeno.readFileSync. - Deno.RemoveOptionsI
Options which can be set when using
Deno.removeandDeno.removeSync. - Deno.SymlinkOptionsI
Options that can be used with
symlinkandsymlinkSync. - Deno.WriteFileOptionsI
Options for writing to a file.
- Deno.FsEventFlagT
Additional information for FsEvent objects with the "other" kind.
GPU
- Deno.UnsafeWindowSurfacec
Creates a presentable WebGPU surface from given window and display handles.
- Deno.webgpu.deviceStartCapturef
Starts a frame capture.
- Deno.webgpu.deviceStopCapturef
Stops a frame capture.
- Deno.webgpuN
The webgpu namespace provides additional APIs that the WebGPU specification does not specify.
HTTP Server
- Deno.servef
Serves HTTP requests with the given handler.
- Deno.HttpServerI
An instance of the server created using
Deno.serve()API. - Deno.ServeDefaultExportI
Interface that module run with
deno servesubcommand must conform to. - Deno.ServeHandlerInfoI
Additional information for an HTTP request and its connection.
- Deno.ServeInitI
- Deno.ServeOptionsI
Options which can be set when calling
Deno.serve. - Deno.ServeTcpOptionsI
Options that can be passed to
Deno.serveto create a server listening on a TCP port. - Deno.ServeUnixOptionsI
Options that can be passed to
Deno.serveto create a server listening on a Unix domain socket. - Deno.ServeVsockOptionsI
Options that can be passed to
Deno.serveto create a server listening on a VSOCK socket. - Deno.ServeHandlerT
A handler for HTTP requests. Consumes a request and returns a response.
I/O
- Deno.SeekModeE
A enum which defines the seek mode for IO related APIs that support seeking.
- Deno.consoleSizef
Gets the size of the console as columns/rows.
- Deno.inspectf
Converts the input into a string that has the same format as printed by
console.log(). - Deno.InspectOptionsI
Option which can be specified when performing
Deno.inspect. - Deno.SetRawOptionsI
- Deno.stderrv
A reference to
stderrwhich can be used to write directly tostderr. It implements the Deno specificWriter,WriterSync, andCloserinterfaces as well as provides aWritableStreaminterface. - Deno.stdinv
A reference to
stdinwhich can be used to read directly fromstdin. - Deno.stdoutv
A reference to
stdoutwhich can be used to write directly tostdout. It implements the Deno specificWriter,WriterSync, andCloserinterfaces as well as provides aWritableStreaminterface.
Jupyter
- Deno.jupyter.broadcastf
Broadcast a message on IO pub channel.
- Deno.jupyter.displayf
Display function for Jupyter Deno Kernel. Mimics the behavior of IPython's
display(obj, raw=True)function to allow asynchronous displaying of objects in Jupyter. - Deno.jupyter.formatf
Format an object for displaying in Deno
- Deno.jupyter.htmlf
Show HTML in Jupyter frontends with a tagged template function.
- Deno.jupyter.imagef
Display a JPG or PNG image.
- Deno.jupyter.mdf
Show Markdown in Jupyter frontends with a tagged template function.
- Deno.jupyter.svgf
SVG Tagged Template Function.
- Deno.jupyter.DisplayableI
- Deno.jupyter.DisplayOptionsI
- Deno.jupyter.MediaBundleI
A collection of supported media types and data for Jupyter frontends.
- Deno.jupyter.VegaObjectI
- Deno.jupyterN
A namespace containing runtime APIs available in Jupyter notebooks.
- Deno.jupyter.$displayv
Linter
- Deno.lint.runPluginf
This API is useful for testing lint plugins.
- Deno.lint.AccessorPropertyI
- Deno.lint.ArrayExpressionI
An array literal
- Deno.lint.ArrayPatternI
Destructure an array.
- Deno.lint.ArrowFunctionExpressionI
Arrow function expression
- Deno.lint.AssignmentExpressionI
Updaate a variable or property.
- Deno.lint.AssignmentPatternI
Assign default values in parameters.
- Deno.lint.AwaitExpressionI
Await a
Promiseand get its fulfilled value. - Deno.lint.BigIntLiteralI
Represents numbers that are too high or too low to be represented by the
numbertype. - Deno.lint.BinaryExpressionI
Compare left and right value with the specifier operator.
- Deno.lint.BlockCommentI
A potentially multi-line block comment
- Deno.lint.BlockStatementI
- Deno.lint.BooleanLiteralI
Either
trueorfalse - Deno.lint.BreakStatementI
Break any loop or labeled statement, example:
- Deno.lint.CallExpressionI
A function call.
- Deno.lint.CatchClauseI
The catch clause of a try/catch statement
- Deno.lint.ChainExpressionI
ChainExpression
- Deno.lint.ClassBodyI
Represents the body of a class and contains all members
- Deno.lint.ClassDeclarationI
Declares a class in the current scope
- Deno.lint.ClassExpressionI
Similar to ClassDeclaration but for declaring a class as an expression. The main difference is that the class name(=id) can be omitted.
- Deno.lint.ConditionalExpressionI
Inline if-statement.
- Deno.lint.ContinueStatementI
Terminates the current loop and continues with the next iteration.
- Deno.lint.DebuggerStatementI
The
debugger;statement. - Deno.lint.DecoratorI
Experimental: Decorators
- Deno.lint.DiagnosticI
- Deno.lint.DoWhileStatementI
Re-run loop for as long as test expression is truthy.
- Deno.lint.ExportAllDeclarationI
- Deno.lint.ExportDefaultDeclarationI
- Deno.lint.ExportNamedDeclarationI
- Deno.lint.ExportSpecifierI
- Deno.lint.ExpressionStatementI
Statement that holds an expression.
- Deno.lint.FixI
- Deno.lint.FixerI
- Deno.lint.ForInStatementI
Enumerate over all enumerable string properties of an object.
- Deno.lint.ForOfStatementI
Iterate over sequence of values from an iterator.
- Deno.lint.ForStatementI
Classic for-loop.
- Deno.lint.FunctionDeclarationI
Declares a function in the current scope
- Deno.lint.FunctionExpressionI
Declare a function as an expression. Similar to
FunctionDeclaration, with an optional name (=id). - Deno.lint.IdentifierI
Custom named node by the developer. Can be a variable name, a function name, parameter, etc.
- Deno.lint.IfStatementI
Execute a statement the test passes, otherwise the alternate statement, if it was defined.
- Deno.lint.ImportAttributeI
- Deno.lint.ImportDeclarationI
An import declaration, examples:
- Deno.lint.ImportDefaultSpecifierI
- Deno.lint.ImportExpressionI
Dynamically import a module.
- Deno.lint.ImportNamespaceSpecifierI
- Deno.lint.ImportSpecifierI
- Deno.lint.JSXAttributeI
A JSX attribute
- Deno.lint.JSXClosingElementI
The closing tag of a JSXElement. Only used when the element is not self-closing.
- Deno.lint.JSXClosingFragmentI
The closing tag of a JSXFragment.
- Deno.lint.JSXElementI
A JSX element.
- Deno.lint.JSXEmptyExpressionI
Empty JSX expression.
- Deno.lint.JSXExpressionContainerI
Inserts a normal JS expression into JSX.
- Deno.lint.JSXFragmentI
Usually a passthrough node to pass multiple sibling elements as the JSX syntax requires one root element.
- Deno.lint.JSXIdentifierI
User named identifier inside JSX.
- Deno.lint.JSXMemberExpressionI
JSX member expression.
- Deno.lint.JSXNamespacedNameI
Namespaced name in JSX
- Deno.lint.JSXOpeningElementI
The opening tag of a JSXElement
- Deno.lint.JSXOpeningFragmentI
The opening tag of a JSXFragment.
- Deno.lint.JSXSpreadAttributeI
Spreads an object as JSX attributes.
- Deno.lint.JSXTextI
Plain text in JSX.
- Deno.lint.LabeledStatementI
Custom control flow based on labels.
- Deno.lint.LineCommentI
A single line comment
- Deno.lint.LogicalExpressionI
Chain expressions based on the operator specified
- Deno.lint.MemberExpressionI
MemberExpression
- Deno.lint.MetaPropertyI
Can either be
import.metaornew.target. - Deno.lint.MethodDefinitionI
- Deno.lint.NewExpressionI
Create a new instance of a class.
- Deno.lint.NullLiteralI
The
nullliteral - Deno.lint.NumberLiteralI
A number literal
- Deno.lint.ObjectExpressionI
An object literal.
- Deno.lint.ObjectPatternI
Destructure an object.
- Deno.lint.PluginI
In your plugins file do something like
- Deno.lint.PrivateIdentifierI
Private members inside of classes, must start with
#. - Deno.lint.ProgramI
- Deno.lint.PropertyI
- Deno.lint.PropertyDefinitionI
- Deno.lint.RegExpLiteralI
A regex literal:
- Deno.lint.ReportDataI
- Deno.lint.RestElementI
The rest of function parameters.
- Deno.lint.ReturnStatementI
Returns a value from a function.
- Deno.lint.RuleI
- Deno.lint.RuleContextI
- Deno.lint.SequenceExpressionI
Execute multiple expressions in sequence.
- Deno.lint.SourceCodeI
- Deno.lint.SpreadElementI
- Deno.lint.StaticBlockI
Static class initializiation block.
- Deno.lint.StringLiteralI
A string literal
- Deno.lint.SuperI
The
superkeyword used in classes. - Deno.lint.SwitchCaseI
A single case of a SwitchStatement.
- Deno.lint.SwitchStatementI
Match an expression against a series of cases.
- Deno.lint.TaggedTemplateExpressionI
Tagged template expression.
- Deno.lint.TemplateElementI
The static portion of a template literal.
- Deno.lint.TemplateLiteralI
A template literal string.
- Deno.lint.ThisExpressionI
The
thiskeyword used in classes. - Deno.lint.ThrowStatementI
Throw a user defined exception. Stops execution of the current function.
- Deno.lint.TryStatementI
Try/catch statement
- Deno.lint.TSAbstractMethodDefinitionI
- Deno.lint.TSAbstractPropertyDefinitionI
- Deno.lint.TSAnyKeywordI
- Deno.lint.TSArrayTypeI
- Deno.lint.TSAsExpressionI
- Deno.lint.TSBigIntKeywordI
- Deno.lint.TSBooleanKeywordI
- Deno.lint.TSCallSignatureDeclarationI
- Deno.lint.TSClassImplementsI
- Deno.lint.TSConditionalTypeI
- Deno.lint.TSConstructSignatureDeclarationI
- Deno.lint.TSDeclareFunctionI
- Deno.lint.TSEmptyBodyFunctionExpressionI
- Deno.lint.TSEnumBodyI
The body of a
TSEnumDeclaration - Deno.lint.TSEnumDeclarationI
- Deno.lint.TSEnumMemberI
A member of a
TSEnumDeclaration - Deno.lint.TSExportAssignmentI
- Deno.lint.TSExternalModuleReferenceI
- Deno.lint.TSFunctionTypeI
- Deno.lint.TSImportEqualsDeclarationI
- Deno.lint.TSImportTypeI
- Deno.lint.TSIndexedAccessTypeI
- Deno.lint.TSIndexSignatureI
- Deno.lint.TSInferTypeI
- Deno.lint.TSInstantiationExpressionI
- Deno.lint.TSInterfaceBodyI
- Deno.lint.TSInterfaceDeclarationI
- Deno.lint.TSInterfaceHeritageI
- Deno.lint.TSIntersectionTypeI
- Deno.lint.TSIntrinsicKeywordI
- Deno.lint.TSLiteralTypeI
- Deno.lint.TSMappedTypeI
- Deno.lint.TSMethodSignatureI
- Deno.lint.TSModuleBlockI
Body of a
TSModuleDeclaration - Deno.lint.TSModuleDeclarationI
- Deno.lint.TSNamedTupleMemberI
- Deno.lint.TSNamespaceExportDeclarationI
- Deno.lint.TSNeverKeywordI
- Deno.lint.TSNonNullExpressionI
- Deno.lint.TSNullKeywordI
- Deno.lint.TSNumberKeywordI
- Deno.lint.TSObjectKeywordI
- Deno.lint.TSOptionalTypeI
- Deno.lint.TSParameterPropertyI
- Deno.lint.TSPropertySignatureI
- Deno.lint.TSQualifiedNameI
- Deno.lint.TSRestTypeI
- Deno.lint.TSSatisfiesExpressionI
- Deno.lint.TSStringKeywordI
- Deno.lint.TSSymbolKeywordI
- Deno.lint.TSTemplateLiteralTypeI
- Deno.lint.TSThisTypeI
- Deno.lint.TSTupleTypeI
- Deno.lint.TSTypeAliasDeclarationI
- Deno.lint.TSTypeAnnotationI
- Deno.lint.TSTypeAssertionI
- Deno.lint.TSTypeLiteralI
- Deno.lint.TSTypeOperatorI
- Deno.lint.TSTypeParameterI
- Deno.lint.TSTypeParameterDeclarationI
- Deno.lint.TSTypeParameterInstantiationI
- Deno.lint.TSTypePredicateI
- Deno.lint.TSTypeQueryI
- Deno.lint.TSTypeReferenceI
- Deno.lint.TSUndefinedKeywordI
- Deno.lint.TSUnionTypeI
- Deno.lint.TSUnknownKeywordI
- Deno.lint.TSVoidKeywordI
- Deno.lint.UnaryExpressionI
Apply operand on value based on the specified operator.
- Deno.lint.UpdateExpressionI
Syntactic sugar to increment or decrement a value.
- Deno.lint.VariableDeclarationI
Variable declaration.
- Deno.lint.VariableDeclaratorI
A VariableDeclaration can declare multiple variables. This node represents a single declaration out of that.
- Deno.lint.WhileStatementI
Run a loop while the test expression is truthy.
- Deno.lint.YieldExpressionI
Pause or resume a generator function.
- Deno.lint.WithStatementI
Legacy JavaScript feature, that's discouraged from being used today.
- Deno.lintN
- Deno.lint.AccessibilityT
TypeScript accessibility modifiers used in classes
- Deno.lint.ExpressionT
Union type of all possible expression nodes
- Deno.lint.JSXChildT
Union type of all possible child nodes in JSX
- Deno.lint.LintVisitorT
- Deno.lint.LiteralT
Union type of all Literals
- Deno.lint.NodeT
Union type of all possible AST nodes
- Deno.lint.ParameterT
Function/Method parameter
- Deno.lint.RangeT
- Deno.lint.StatementT
Union type of all possible statement nodes
- Deno.lint.TypeNodeT
Union type of all possible type nodes in TypeScript
Network
- Deno.QuicEndpointc
- Deno.connectf
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). - Deno.connectQuicf
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.
- Deno.connectTlsf
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.
- Deno.listenf
Listen announces on the local transport address.
- Deno.listenDatagramf
Listen announces on the local transport address.
- Deno.listenTlsf
Listen announces on the local transport address over TLS (transport layer security).
- Deno.networkInterfacesf
Returns an array of the network interface information.
- Deno.resolveDnsf
Performs DNS resolution against the given query, returning resolved records.
- Deno.startTlsf
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.
- Deno.upgradeWebTransportf
Upgrade a QUIC connection into a WebTransport instance.
- Deno.CaaRecordI
If
Deno.resolveDnsis called with"CAA"record type specified, it will resolve with an array of objects with this interface. - Deno.ConnI
A generic stream-oriented network connection that can be read from and written to.
- Deno.ConnectOptionsI
Options which can be set when connecting via
Deno.connect. - Deno.ConnectQuicOptionsI
- Deno.ConnectTlsOptionsI
Options which can be set when establishing a TLS connection via
Deno.connectTls. - Deno.DatagramConnI
A generic transport listener for message-oriented protocols.
- Deno.ListenerI
A generic network listener for stream-oriented protocols.
- Deno.ListenOptionsI
Options which can be set when opening a listener via
Deno.listen. - Deno.ListenTlsOptionsI
Options which can be set when opening a TLS listener via
Deno.listenTls. - Deno.MulticastV4MembershipI
Represents membership of a IPv4 multicast group.
- Deno.MulticastV6MembershipI
Represents membership of a IPv6 multicast group.
- Deno.MxRecordI
If
Deno.resolveDnsis called with"MX"record type specified, it will return an array of objects with this interface. - Deno.NaptrRecordI
If
Deno.resolveDnsis called with"NAPTR"record type specified, it will return an array of objects with this interface. - Deno.NetAddrI
The address of a network connection or listener using an IP-based transport.
- Deno.NetworkInterfaceInfoI
The information for a network interface returned from a call to
Deno.networkInterfaces. - Deno.QuicAcceptOptionsI
- Deno.QuicBidirectionalStreamI
- Deno.QuicCloseInfoI
- Deno.QuicConnI
- Deno.QuicEndpointOptionsI
- Deno.QuicIncomingI
An incoming connection for which the server has not yet begun its part of the handshake.
- Deno.QuicListenerI
Specialized listener that accepts QUIC connections.
- Deno.QuicListenOptionsI
- Deno.QuicReceiveStreamI
- Deno.QuicSendStreamI
- Deno.QuicSendStreamOptionsI
- Deno.QuicServerTransportOptionsI
- Deno.QuicTransportOptionsI
- Deno.ResolveDnsOptionsI
Options which can be set when using
Deno.resolveDns. - Deno.SoaRecordI
If
Deno.resolveDnsis called with"SOA"record type specified, it will return an array of objects with this interface. - Deno.SrvRecordI
If
Deno.resolveDnsis called with"SRV"record type specified, it will return an array of objects with this interface. - Deno.StartTlsOptionsI
Options which can be set when upgrading an existing connection to TLS via
Deno.startTls. - Deno.TcpConnI
A TCP stream connection.
- Deno.TcpListenOptionsI
- Deno.TlsCertifiedKeyPemI
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 withDER-format keys which are binary. - Deno.TlsConnI
A TLS-encrypted stream connection over an IP-based transport.
- Deno.TlsHandshakeInfoI
Information about a completed TLS handshake.
- Deno.UdpListenOptionsI
Unstable options which can be set when opening a datagram listener via
Deno.listenDatagram. - Deno.UnixAddrI
The address of a network connection or listener using a Unix domain socket.
- Deno.UnixConnI
A Unix domain socket stream connection.
- Deno.UnixConnectOptionsI
Options which can be set when connecting to a Unix domain socket via
Deno.connect. - Deno.UnixListenDatagramOptionsI
Unstable options which can be set when opening a
unixpacketdatagram listener viaDeno.listenDatagram. - Deno.UnixListenOptionsI
Options which can be set when opening a Unix listener via
Deno.listenorDeno.listenDatagram. - Deno.VsockAddrI
The address of a network connection or listener using the VSOCK transport for communication between a virtual machine and its host.
- Deno.VsockConnI
A VSOCK stream connection.
- Deno.VsockConnectOptionsI
Options which can be set when connecting over VSOCK via
Deno.connect. - Deno.VsockListenOptionsI
Options which can be set when opening a VSOCK listener via
Deno.listen. - Deno.AddrT
The address of a network connection or listener, regardless of transport.
- Deno.RecordTypeT
The type of the resource record to resolve via DNS using
Deno.resolveDns. - Deno.TcpListenerT
Specialized listener that accepts TCP connections.
- Deno.TlsListenerT
Specialized listener that accepts TLS connections.
- Deno.UnixListenerT
Specialized listener that accepts Unix connections.
- Deno.VsockListenerT
Specialized listener that accepts VSOCK connections.
Permissions
- Deno.Permissionsc
Deno's permission management API.
- Deno.PermissionStatusc
An
EventTargetreturned from theDeno.permissionsAPI which can provide updates to any state changes of the permission. - Deno.EnvPermissionDescriptorI
The permission descriptor for the
allow-envanddeny-envpermissions, 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 optionvariableallows scoping the permission to a specific environment variable. - Deno.FfiPermissionDescriptorI
The permission descriptor for the
allow-ffianddeny-ffipermissions, which controls access to loading foreign code and interfacing with it via the Foreign Function Interface API available in Deno. The optionpathallows scoping the permission to a specific path on the host. - Deno.ImportPermissionDescriptorI
The permission descriptor for the
allow-importanddeny-importpermissions, which controls access to importing from remote hosts via the network. The optionhostallows scoping the permission for outbound connection to a specific host and port. - Deno.NetPermissionDescriptorI
The permission descriptor for the
allow-netanddeny-netpermissions, which controls access to opening network ports and connecting to remote hosts via the network. The optionhostallows scoping the permission for outbound connection to a specific host and port. - Deno.PermissionOptionsObjectI
A set of options which can define the permissions within a test or worker context at a highly specific level.
- Deno.PermissionStatusEventMapI
The interface which defines what event types are supported by
PermissionStatusinstances. - Deno.ReadPermissionDescriptorI
The permission descriptor for the
allow-readanddeny-readpermissions, which controls access to reading resources from the local host. The optionpathallows scoping the permission to a specific path (and if the path is a directory any sub paths). - Deno.RunPermissionDescriptorI
The permission descriptor for the
allow-runanddeny-runpermissions, which controls access to what sub-processes can be executed by Deno. The optioncommandallows scoping the permission to a specific executable. - Deno.SysPermissionDescriptorI
The permission descriptor for the
allow-sysanddeny-syspermissions, which controls access to sensitive host system information, which malicious code might attempt to exploit. The optionkindallows scoping the permission to a specific piece of information. - Deno.WritePermissionDescriptorI
The permission descriptor for the
allow-writeanddeny-writepermissions, which controls access to writing to resources from the local host. The optionpathallow scoping the permission to a specific path (and if the path is a directory any sub paths). - Deno.PermissionDescriptorT
Permission descriptors which define a permission and can be queried, requested, or revoked.
- Deno.PermissionNameT
The name of a privileged feature which needs permission.
- Deno.PermissionOptionsT
Options which define the permissions within a test or worker context.
- Deno.PermissionStateT
The current status of the permission:
- Deno.permissionsv
Deno's permission management API.
Runtime
- Deno.addSignalListenerf
Registers the given function as a listener of the given signal event.
- Deno.chdirf
Change the current working directory to the specified path.
- Deno.cwdf
Return a string representing the current working directory.
- Deno.execPathf
Returns the path to the current deno executable.
- Deno.exitf
Exit the Deno process with optional exit code.
- Deno.gidf
Returns the group id of the process on POSIX platforms. Returns null on windows.
- Deno.hostnamef
Get the
hostnameof the machine the Deno process is running on. - Deno.loadavgf
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.
- Deno.memoryUsagef
Returns an object describing the memory usage of the Deno process and the V8 subsystem measured in bytes.
- Deno.osReleasef
Returns the release version of the Operating System.
- Deno.osUptimef
Returns the Operating System uptime in number of seconds.
- Deno.refTimerf
Make the timer of the given
idblock the event loop from finishing. - Deno.removeSignalListenerf
Removes the given signal listener that has been registered with
Deno.addSignalListener. - Deno.systemMemoryInfof
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.
- Deno.uidf
Returns the user id of the process on POSIX platforms. Returns null on Windows.
- Deno.unrefTimerf
Make the timer of the given
idnot block the event loop from finishing. - Deno.EnvI
An interface containing methods to interact with the process environment variables.
- Deno.MemoryUsageI
- Deno.SystemMemoryInfoI
Information returned from a call to
Deno.systemMemoryInfo. - Deno.SignalT
Operating signals which can be listened for or sent to sub-processes. What signals and what their standard behaviors are OS dependent.
- Deno.argsv
Returns the script arguments to the program.
- Deno.buildv
Information related to the build of the current Deno runtime.
- Deno.envv
An interface containing methods to interact with the process environment variables.
- Deno.exitCodev
The exit code for the Deno process.
- Deno.mainModulev
The URL of the entrypoint module entered from the command-line. It requires read permission to the CWD.
- Deno.noColorv
Reflects the
NO_COLORenvironment variable at program start. - Deno.pidv
The current process ID of this instance of the Deno CLI.
- Deno.ppidv
The process ID of parent process of this instance of the Deno CLI.
- Deno.versionv
Version information related to the current Deno CLI runtime environment.
Subprocess
- Deno.ChildProcessc
The interface for handling a child process returned from
Deno.Command.spawn. - Deno.Commandc
Create a child process.
- Deno.killf
Send a signal to process under given
pid. The value and meaning of thesignalto the process is operating system and process dependant.Signalprovides the most common signals. Default signal is"SIGTERM". - Deno.spawnf
Spawns a new subprocess, returning a
Deno.ChildProcesshandle. - Deno.spawnAndWaitf
Spawns a subprocess, waits for it to finish, and returns the output.
- Deno.spawnAndWaitSyncf
Synchronously spawns a subprocess, waits for it to finish, and returns the output.
- Deno.CommandOptionsI
Options which can be set when calling
Deno.Command. - Deno.CommandOutputI
The interface returned from calling
Deno.Command.outputorDeno.Command.outputSyncwhich represents the result of spawning the child process. - Deno.CommandStatusI
- Deno.SubprocessReadableStreamI
The interface for stdout and stderr streams for child process returned from
Deno.Command.spawn.
Telemetry
- Deno.telemetryN
APIs for working with the OpenTelemetry observability framework. Deno can export traces, metrics, and logs to OpenTelemetry compatible backends via the OTLP protocol.
- Deno.telemetry.contextManagerv
A ContextManager compatible with OpenTelemetry.js https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.ContextManager.html
- Deno.telemetry.meterProviderv
A MeterProvider compatible with OpenTelemetry.js https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.MeterProvider.html
- Deno.telemetry.tracerProviderv
A TracerProvider compatible with OpenTelemetry.js https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.TracerProvider.html
Testing
- Deno.benchf
Register a benchmark test which will be run when
deno benchis used on the command line and the containing module looks like a bench module. - Deno.BenchContextI
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.
- Deno.BenchDefinitionI
The interface for defining a benchmark test using
Deno.bench. - Deno.DenoTestI
- Deno.TestContextI
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.
- Deno.TestDefinitionI
- Deno.TestStepDefinitionI
- Deno.testv
Register a test which will be run when
deno testis used on the command line and the containing module looks like a test module.
WebSockets
- Deno.upgradeWebSocketf
Upgrade an incoming HTTP request to a WebSocket.
- Deno.UpgradeWebSocketOptionsI
Options which can be set when performing a
Deno.upgradeWebSocketupgrade of aRequest - Deno.WebSocketUpgradeI
The object that is returned from a
Deno.upgradeWebSocketrequest.
Other APIs
- DenoN
The global namespace where Deno specific, non-standard APIs are located.