Spec-Zone.ru › Deno 2

Deno APIs reference

Deno APIs

About the Deno namespace · All symbols

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.

Bundler

  • Deno.bundle

    Bundle Typescript/Javascript code into a single file.

  • Deno.bundle.Message

    A message emitted from the bundler.

  • Deno.bundle.MessageLocation

    The location of a message.

  • Deno.bundle.MessageNote

    A note about a message.

  • Deno.bundle.Options

    Options for the bundle.

  • Deno.bundle.OutputFile

    An output file in the bundle.

  • Deno.bundle.Result

    The result of bundling.

  • Deno.bundle.Format

    The output format of the bundle.

  • Deno.bundle.PackageHandling

    How to handle packages.

  • Deno.bundle.Platform

    The target platform of the bundle.

  • Deno.bundle.SourceMapType

    The source map type of the bundle.

Cloud

  • Deno.AtomicOperation

    An operation on a Deno.Kv that can be performed atomically. Atomic operations do not auto-commit, and must be committed explicitly by calling the commit method.

  • Deno.Kv

    A key-value database that can be used to store and retrieve data.

  • Deno.KvListIterator

    An iterator over a range of data entries in a Deno.Kv.

  • Deno.KvU64

    Wrapper type for 64-bit unsigned integers for use as values in a Deno.Kv.

  • Deno.cron

    Create a cron job that will periodically execute the provided handler callback based on the specified schedule.

  • Deno.openKv

    Open a new Deno.Kv connection to persist data.

  • Deno.AtomicCheck

    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.

  • Deno.CronSchedule

    CronSchedule is the interface used for JSON format cron schedule.

  • Deno.KvCommitError
  • Deno.KvCommitResult
  • Deno.KvEntry

    A versioned pair of key and value in a Deno.Kv.

  • Deno.KvListOptions

    Options for listing key-value pairs in a Deno.Kv.

  • Deno.CronScheduleExpression

    CronScheduleExpression is used as the type of minute, hour, dayOfMonth, month, and dayOfWeek in CronSchedule.

  • Deno.KvConsistencyLevel

    Consistency level of a KV operation.

  • Deno.KvEntryMaybe

    An optional versioned pair of key and value in a Deno.Kv.

  • Deno.KvKey

    A key to be persisted in a Deno.Kv. A key is a sequence of Deno.KvKeyParts.

  • Deno.KvKeyPart

    A single part of a Deno.KvKey. Parts are ordered lexicographically, first by their type, and within a given type by their value.

  • Deno.KvListSelector

    A selector that selects the range of data returned by a list operation on a Deno.Kv.

  • Deno.KvMutation

    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.AddrInUse

    Raised when attempting to open a server listener on an address and port that already has a listener.

  • Deno.errors.AddrNotAvailable

    Raised when the underlying operating system reports an EADDRNOTAVAIL error.

  • Deno.errors.AlreadyExists

    Raised when trying to create a resource, like a file, that already exits.

  • Deno.errors.BadResource

    The underlying IO resource is invalid or closed, and so the operation could not be performed.

  • Deno.errors.BrokenPipe

    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 reason external to the Deno runtime.

  • Deno.errors.Busy

    Raised when the underlying IO resource is not available because it is being awaited on in another block of code.

  • Deno.errors.ConnectionAborted

    Raised when the underlying operating system reports an ECONNABORTED error.

  • Deno.errors.ConnectionRefused

    Raised when the underlying operating system reports that a connection to a resource is refused.

  • Deno.errors.ConnectionReset

    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.FilesystemLoop

    Raised when too many symbolic links were encountered when resolving the filename.

  • Deno.errors.Http

    Raised in situations where when attempting to load a dynamic import, too many redirects were encountered.

  • Deno.errors.Interrupted

    Raised when the underlying operating system reports an EINTR error. In many cases, this underlying IO error will be handled internally within Deno, or result in an BadResource error instead.

  • Deno.errors.InvalidData

    Raised when an operation returns data that is invalid for the operation being performed.

  • Deno.errors.IsADirectory

    Raised when trying to open, create or write to a directory.

  • Deno.errors.NetworkUnreachable

    Raised when performing a socket operation but the remote host is not reachable.

  • Deno.errors.NotADirectory

    Raised when trying to perform an operation on a path that is not a directory, when directory is required.

  • Deno.errors.NotCapable

    Raised when trying to perform an operation while the relevant Deno permission (like --allow-read) has not been granted.

  • Deno.errors.NotConnected

    Raised when the underlying operating system reports an ENOTCONN error.

  • Deno.errors.NotFound

    Raised when the underlying operating system indicates that the file was not found.

  • Deno.errors.NotSupported

    Raised when the underlying Deno API is asked to perform a function that is not currently supported.

  • Deno.errors.PermissionDenied

    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.TimedOut

    Raised when the underlying operating system reports that an I/O operation has timed out (ETIMEDOUT).

  • Deno.errors.UnexpectedEof

    Raised when attempting to read bytes from a resource, but the EOF was unexpectedly encountered.

  • Deno.errors.WouldBlock

    Raised when the underlying operating system would need to block to complete but an asynchronous (non-blocking) API is used.

  • Deno.errors.WriteZero

    Raised when expecting to write to a IO buffer resulted in zero bytes being written.

  • Deno.errors

    A set of error constructors that are raised by Deno APIs.

Fetch

  • Deno.HttpClient

    A custom HttpClient for use with fetch function. This is designed to allow custom certificates or proxies to be used with fetch().

  • Deno.createHttpClient

    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().

  • Deno.BasicAuth

    Basic authentication credentials to be used with a Deno.Proxy server when specifying Deno.CreateHttpClientOptions.

  • Deno.CreateHttpClientOptions

    The options used when creating a Deno.HttpClient.

  • Deno.Proxy

    The definition for alternative transports (or proxies) in Deno.CreateHttpClientOptions.

FFI

  • Deno.UnsafeCallback

    An unsafe function pointer for passing JavaScript functions as C function pointers to foreign function calls.

  • Deno.UnsafeFnPointer

    An unsafe pointer to a function, for calling functions that are not present as symbols.

  • Deno.UnsafePointer

    A collection of static functions for interacting with pointer objects.

  • Deno.UnsafePointerView

    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).

  • Deno.dlopen

    Opens an external dynamic library and registers symbols, making foreign functions available to be called.

  • Deno.DynamicLibrary

    A dynamic library resource. Use Deno.dlopen to load a dynamic library and return this interface.

  • Deno.ForeignFunction

    The interface for a foreign function as defined by its parameter and result types.

  • Deno.ForeignLibraryInterface

    A foreign library interface descriptor.

  • Deno.ForeignStatic
  • Deno.NativeStructType

    The native struct type for interfacing with foreign functions.

  • Deno.PointerObject

    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.

  • Deno.UnsafeCallbackDefinition

    Definition of a unsafe callback function.

  • Deno.ConditionalAsync
  • Deno.FromForeignFunction
  • Deno.FromNativeParameterTypes
  • Deno.FromNativeResultType

    Type conversion for foreign symbol return types.

  • Deno.FromNativeType

    Type conversion for foreign symbol return types and unsafe callback parameters.

  • Deno.NativeBigIntType

    All BigInt number types for interfacing with foreign functions.

  • Deno.NativeBooleanType

    The native boolean type for interfacing to foreign functions.

  • Deno.NativeBufferType

    The native buffer type for interfacing to foreign functions.

  • Deno.NativeFunctionType

    The native function type for interfacing with foreign functions.

  • Deno.NativeI16Enum
  • Deno.NativeI32Enum
  • Deno.NativeI8Enum
  • Deno.NativeNumberType

    All plain number types for interfacing with foreign functions.

  • Deno.NativePointerType

    The native pointer type for interfacing to foreign functions.

  • Deno.NativeResultType
  • Deno.NativeType

    All supported types for interfacing with foreign functions.

  • Deno.NativeTypedFunction
  • Deno.NativeTypedPointer
  • Deno.NativeU16Enum
  • Deno.NativeU32Enum
  • Deno.NativeU8Enum
  • Deno.NativeVoidType

    The native void type for interfacing with foreign functions.

  • Deno.PointerValue

    Pointers are represented either with a PointerObject object or a null if the pointer is null.

  • Deno.StaticForeignLibraryInterface

    A utility type that infers a foreign library interface.

  • Deno.StaticForeignSymbol

    A utility type that infers a foreign symbol.

  • Deno.StaticForeignSymbolReturnType
  • Deno.ToNativeParameterTypes

    A utility type for conversion of parameter types of foreign functions.

  • Deno.ToNativeResultType

    Type conversion for unsafe callback return types.

  • Deno.ToNativeType

    Type conversion for foreign symbol parameters and unsafe callback return types.

  • Deno.UnsafeCallbackFunction

    An unsafe callback function.

  • Deno.brand

File System

  • Deno.FsFile

    The Deno abstraction for reading and writing files.

  • Deno.chmod

    Changes the permission of a specific file/directory of specified path. Ignores the process's umask.

  • Deno.chmodSync

    Synchronously changes the permission of a specific file/directory of specified path. Ignores the process's umask.

  • Deno.chown

    Change owner of a regular file or directory.

  • Deno.chownSync

    Synchronously change owner of a regular file or directory.

  • Deno.copyFile

    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.copyFileSync

    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.create

    Creates a file if none exists or truncates an existing file and resolves to an instance of Deno.FsFile.

  • Deno.createSync

    Creates a file if none exists or truncates an existing file and returns an instance of Deno.FsFile.

  • Deno.link

    Creates newpath as a hard link to oldpath.

  • Deno.linkSync

    Synchronously creates newpath as a hard link to oldpath.

  • Deno.lstat

    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.

  • Deno.lstatSync

    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.

  • Deno.makeTempDir

    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.

  • Deno.makeTempDirSync

    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.

  • Deno.makeTempFile

    Creates a new temporary file in the default directory for temporary files, unless dir is specified.

  • Deno.makeTempFileSync

    Synchronously creates a new temporary file in the default directory for temporary files, unless dir is specified.

  • Deno.mkdir

    Creates a new directory with the specified path.

  • Deno.mkdirSync

    Synchronously creates a new directory with the specified path.

  • Deno.open

    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.

  • Deno.openSync

    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.

  • Deno.readDir

    Reads the directory given by path and returns an async iterable of Deno.DirEntry. The order of entries is not guaranteed.

  • Deno.readDirSync

    Synchronously reads the directory given by path and returns an iterable of Deno.DirEntry. The order of entries is not guaranteed.

  • Deno.readFile

    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. Rejects with an error when reading a directory.

  • Deno.readFileSync

    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. Throws an error when reading a directory.

  • Deno.readLink

    Resolves to the full path destination of the named symbolic link.

  • Deno.readLinkSync

    Synchronously returns the full path destination of the named symbolic link.

  • Deno.readTextFile

    Asynchronously reads and returns the entire contents of a file as an UTF-8 decoded string.

  • Deno.readTextFileSync

    Synchronously reads and returns the entire contents of a file as an UTF-8 decoded string.

  • Deno.realPath

    Resolves to the absolute normalized path, with symbolic links resolved.

  • Deno.realPathSync

    Synchronously returns absolute normalized path, with symbolic links resolved.

  • Deno.remove

    Removes the named file or directory.

  • Deno.removeSync

    Synchronously removes the named file or directory.

  • Deno.rename

    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.

  • Deno.renameSync

    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.

  • Deno.stat

    Resolves to a Deno.FileInfo for the specified path. Will always follow symlinks.

  • Deno.statSync

    Synchronously returns a Deno.FileInfo for the specified path. Will always follow symlinks.

  • Deno.symlink

    Creates newpath as a symbolic link to oldpath.

  • Deno.symlinkSync

    Creates newpath as a symbolic link to oldpath.

  • Deno.truncate

    Truncates (or extends) the specified file, to reach the specified len. If len is not specified then the entire file contents are truncated.

  • Deno.truncateSync

    Synchronously truncates (or extends) the specified file, to reach the specified len. If len is not specified then the entire file contents are truncated.

  • Deno.umask

    Retrieve the process umask. If mask is provided, sets the process umask. This call always returns what the umask was before the call.

  • Deno.utime

    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.

  • Deno.utimeSync

    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.

  • Deno.watchFs

    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.writeFile

    Write data to the given path, by default creating a new file if needed, else overwriting.

  • Deno.writeFileSync

    Synchronously write data to the given path, by default creating a new file if needed, else overwriting.

  • Deno.writeTextFile

    Write string data to the given path, by default creating a new file if needed, else overwriting.

  • Deno.writeTextFileSync

    Synchronously write string data to the given path, by default creating a new file if needed, else overwriting.

  • Deno.DirEntry

    Information about a directory entry returned from Deno.readDir and Deno.readDirSync.

  • Deno.FileInfo

    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.

  • Deno.FsEvent

    Represents a unique file system event yielded by a Deno.FsWatcher.

  • Deno.FsWatcher

    Returned by Deno.watchFs. It is an async iterator yielding up system events. To stop watching the file system by calling .close() method.

  • Deno.MakeTempOptions

    Options which can be set when using Deno.makeTempDir, Deno.makeTempDirSync, Deno.makeTempFile, and Deno.makeTempFileSync.

  • Deno.MkdirOptions

    Options which can be set when using Deno.mkdir and Deno.mkdirSync.

  • Deno.OpenOptions

    Options which can be set when doing Deno.open and Deno.openSync.

  • Deno.ReadFileOptions

    Options which can be set when using Deno.readFile or Deno.readFileSync.

  • Deno.RemoveOptions

    Options which can be set when using Deno.remove and Deno.removeSync.

  • Deno.SymlinkOptions

    Options that can be used with symlink and symlinkSync.

  • Deno.WriteFileOptions

    Options for writing to a file.

  • Deno.FsEventFlag

    Additional information for FsEvent objects with the "other" kind.

GPU

  • Deno.UnsafeWindowSurface

    Creates a presentable WebGPU surface from given window and display handles.

  • Deno.webgpu.deviceStartCapture

    Starts a frame capture.

  • Deno.webgpu.deviceStopCapture

    Stops a frame capture.

  • Deno.webgpu

    The webgpu namespace provides additional APIs that the WebGPU specification does not specify.

HTTP Server

  • Deno.serve

    Serves HTTP requests with the given handler.

  • Deno.HttpServer

    An instance of the server created using Deno.serve() API.

  • Deno.ServeDefaultExport

    Interface that module run with deno serve subcommand must conform to.

  • Deno.ServeHandlerInfo

    Additional information for an HTTP request and its connection.

  • Deno.ServeInit
  • Deno.ServeOptions

    Options which can be set when calling Deno.serve.

  • Deno.ServeTcpOptions

    Options that can be passed to Deno.serve to create a server listening on a TCP port.

  • Deno.ServeUnixOptions

    Options that can be passed to Deno.serve to create a server listening on a Unix domain socket.

  • Deno.ServeVsockOptions

    Options that can be passed to Deno.serve to create a server listening on a VSOCK socket.

  • Deno.ServeHandler

    A handler for HTTP requests. Consumes a request and returns a response.

I/O

  • Deno.SeekMode

    A enum which defines the seek mode for IO related APIs that support seeking.

  • Deno.consoleSize

    Gets the size of the console as columns/rows.

  • Deno.inspect

    Converts the input into a string that has the same format as printed by console.log().

  • Deno.InspectOptions

    Option which can be specified when performing Deno.inspect.

  • Deno.SetRawOptions
  • Deno.stderr

    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.

  • Deno.stdin

    A reference to stdin which can be used to read directly from stdin.

  • Deno.stdout

    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.

Jupyter

  • Deno.jupyter.broadcast

    Broadcast a message on IO pub channel.

  • Deno.jupyter.display

    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.format

    Format an object for displaying in Deno

  • Deno.jupyter.html

    Show HTML in Jupyter frontends with a tagged template function.

  • Deno.jupyter.image

    Display a JPG or PNG image.

  • Deno.jupyter.md

    Show Markdown in Jupyter frontends with a tagged template function.

  • Deno.jupyter.svg

    SVG Tagged Template Function.

  • Deno.jupyter.Displayable
  • Deno.jupyter.DisplayOptions
  • Deno.jupyter.MediaBundle

    A collection of supported media types and data for Jupyter frontends.

  • Deno.jupyter.VegaObject
  • Deno.jupyter

    A namespace containing runtime APIs available in Jupyter notebooks.

  • Deno.jupyter.$display

Linter

  • Deno.lint.runPlugin

    This API is useful for testing lint plugins.

  • Deno.lint.AccessorProperty
  • Deno.lint.ArrayExpression

    An array literal

  • Deno.lint.ArrayPattern

    Destructure an array.

  • Deno.lint.ArrowFunctionExpression

    Arrow function expression

  • Deno.lint.AssignmentExpression

    Updaate a variable or property.

  • Deno.lint.AssignmentPattern

    Assign default values in parameters.

  • Deno.lint.AwaitExpression

    Await a Promise and get its fulfilled value.

  • Deno.lint.BigIntLiteral

    Represents numbers that are too high or too low to be represented by the number type.

  • Deno.lint.BinaryExpression

    Compare left and right value with the specifier operator.

  • Deno.lint.BlockComment

    A potentially multi-line block comment

  • Deno.lint.BlockStatement
  • Deno.lint.BooleanLiteral

    Either true or false

  • Deno.lint.BreakStatement

    Break any loop or labeled statement, example:

  • Deno.lint.CallExpression

    A function call.

  • Deno.lint.CatchClause

    The catch clause of a try/catch statement

  • Deno.lint.ChainExpression

    ChainExpression

  • Deno.lint.ClassBody

    Represents the body of a class and contains all members

  • Deno.lint.ClassDeclaration

    Declares a class in the current scope

  • Deno.lint.ClassExpression

    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.ConditionalExpression

    Inline if-statement.

  • Deno.lint.ContinueStatement

    Terminates the current loop and continues with the next iteration.

  • Deno.lint.DebuggerStatement

    The debugger; statement.

  • Deno.lint.Decorator

    Experimental: Decorators

  • Deno.lint.Diagnostic
  • Deno.lint.DoWhileStatement

    Re-run loop for as long as test expression is truthy.

  • Deno.lint.ExportAllDeclaration
  • Deno.lint.ExportDefaultDeclaration
  • Deno.lint.ExportNamedDeclaration
  • Deno.lint.ExportSpecifier
  • Deno.lint.ExpressionStatement

    Statement that holds an expression.

  • Deno.lint.Fix
  • Deno.lint.Fixer
  • Deno.lint.ForInStatement

    Enumerate over all enumerable string properties of an object.

  • Deno.lint.ForOfStatement

    Iterate over sequence of values from an iterator.

  • Deno.lint.ForStatement

    Classic for-loop.

  • Deno.lint.FunctionDeclaration

    Declares a function in the current scope

  • Deno.lint.FunctionExpression

    Declare a function as an expression. Similar to FunctionDeclaration, with an optional name (=id).

  • Deno.lint.Identifier

    Custom named node by the developer. Can be a variable name, a function name, parameter, etc.

  • Deno.lint.IfStatement

    Execute a statement the test passes, otherwise the alternate statement, if it was defined.

  • Deno.lint.ImportAttribute
  • Deno.lint.ImportDeclaration

    An import declaration, examples:

  • Deno.lint.ImportDefaultSpecifier
  • Deno.lint.ImportExpression

    Dynamically import a module.

  • Deno.lint.ImportNamespaceSpecifier
  • Deno.lint.ImportSpecifier
  • Deno.lint.JSXAttribute

    A JSX attribute

  • Deno.lint.JSXClosingElement

    The closing tag of a JSXElement. Only used when the element is not self-closing.

  • Deno.lint.JSXClosingFragment

    The closing tag of a JSXFragment.

  • Deno.lint.JSXElement

    A JSX element.

  • Deno.lint.JSXEmptyExpression

    Empty JSX expression.

  • Deno.lint.JSXExpressionContainer

    Inserts a normal JS expression into JSX.

  • Deno.lint.JSXFragment

    Usually a passthrough node to pass multiple sibling elements as the JSX syntax requires one root element.

  • Deno.lint.JSXIdentifier

    User named identifier inside JSX.

  • Deno.lint.JSXMemberExpression

    JSX member expression.

  • Deno.lint.JSXNamespacedName

    Namespaced name in JSX

  • Deno.lint.JSXOpeningElement

    The opening tag of a JSXElement

  • Deno.lint.JSXOpeningFragment

    The opening tag of a JSXFragment.

  • Deno.lint.JSXSpreadAttribute

    Spreads an object as JSX attributes.

  • Deno.lint.JSXText

    Plain text in JSX.

  • Deno.lint.LabeledStatement

    Custom control flow based on labels.

  • Deno.lint.LineComment

    A single line comment

  • Deno.lint.LogicalExpression

    Chain expressions based on the operator specified

  • Deno.lint.MemberExpression

    MemberExpression

  • Deno.lint.MetaProperty

    Can either be import.meta or new.target.

  • Deno.lint.MethodDefinition
  • Deno.lint.NewExpression

    Create a new instance of a class.

  • Deno.lint.NullLiteral

    The null literal

  • Deno.lint.NumberLiteral

    A number literal

  • Deno.lint.ObjectExpression

    An object literal.

  • Deno.lint.ObjectPattern

    Destructure an object.

  • Deno.lint.Plugin

    In your plugins file do something like

  • Deno.lint.PrivateIdentifier

    Private members inside of classes, must start with #.

  • Deno.lint.Program
  • Deno.lint.Property
  • Deno.lint.PropertyDefinition
  • Deno.lint.RegExpLiteral

    A regex literal:

  • Deno.lint.ReportData
  • Deno.lint.RestElement

    The rest of function parameters.

  • Deno.lint.ReturnStatement

    Returns a value from a function.

  • Deno.lint.Rule
  • Deno.lint.RuleContext
  • Deno.lint.SequenceExpression

    Execute multiple expressions in sequence.

  • Deno.lint.SourceCode
  • Deno.lint.SpreadElement
  • Deno.lint.StaticBlock

    Static class initializiation block.

  • Deno.lint.StringLiteral

    A string literal

  • Deno.lint.Super

    The super keyword used in classes.

  • Deno.lint.SwitchCase

    A single case of a SwitchStatement.

  • Deno.lint.SwitchStatement

    Match an expression against a series of cases.

  • Deno.lint.TaggedTemplateExpression

    Tagged template expression.

  • Deno.lint.TemplateElement

    The static portion of a template literal.

  • Deno.lint.TemplateLiteral

    A template literal string.

  • Deno.lint.ThisExpression

    The this keyword used in classes.

  • Deno.lint.ThrowStatement

    Throw a user defined exception. Stops execution of the current function.

  • Deno.lint.TryStatement

    Try/catch statement

  • Deno.lint.TSAbstractMethodDefinition
  • Deno.lint.TSAbstractPropertyDefinition
  • Deno.lint.TSAnyKeyword
  • Deno.lint.TSArrayType
  • Deno.lint.TSAsExpression
  • Deno.lint.TSBigIntKeyword
  • Deno.lint.TSBooleanKeyword
  • Deno.lint.TSCallSignatureDeclaration
  • Deno.lint.TSClassImplements
  • Deno.lint.TSConditionalType
  • Deno.lint.TSConstructSignatureDeclaration
  • Deno.lint.TSDeclareFunction
  • Deno.lint.TSEmptyBodyFunctionExpression
  • Deno.lint.TSEnumBody

    The body of a TSEnumDeclaration

  • Deno.lint.TSEnumDeclaration
  • Deno.lint.TSEnumMember

    A member of a TSEnumDeclaration

  • Deno.lint.TSExportAssignment
  • Deno.lint.TSExternalModuleReference
  • Deno.lint.TSFunctionType
  • Deno.lint.TSImportEqualsDeclaration
  • Deno.lint.TSImportType
  • Deno.lint.TSIndexedAccessType
  • Deno.lint.TSIndexSignature
  • Deno.lint.TSInferType
  • Deno.lint.TSInstantiationExpression
  • Deno.lint.TSInterfaceBody
  • Deno.lint.TSInterfaceDeclaration
  • Deno.lint.TSInterfaceHeritage
  • Deno.lint.TSIntersectionType
  • Deno.lint.TSIntrinsicKeyword
  • Deno.lint.TSLiteralType
  • Deno.lint.TSMappedType
  • Deno.lint.TSMethodSignature
  • Deno.lint.TSModuleBlock

    Body of a TSModuleDeclaration

  • Deno.lint.TSModuleDeclaration
  • Deno.lint.TSNamedTupleMember
  • Deno.lint.TSNamespaceExportDeclaration
  • Deno.lint.TSNeverKeyword
  • Deno.lint.TSNonNullExpression
  • Deno.lint.TSNullKeyword
  • Deno.lint.TSNumberKeyword
  • Deno.lint.TSObjectKeyword
  • Deno.lint.TSOptionalType
  • Deno.lint.TSParameterProperty
  • Deno.lint.TSPropertySignature
  • Deno.lint.TSQualifiedName
  • Deno.lint.TSRestType
  • Deno.lint.TSSatisfiesExpression
  • Deno.lint.TSStringKeyword
  • Deno.lint.TSSymbolKeyword
  • Deno.lint.TSTemplateLiteralType
  • Deno.lint.TSThisType
  • Deno.lint.TSTupleType
  • Deno.lint.TSTypeAliasDeclaration
  • Deno.lint.TSTypeAnnotation
  • Deno.lint.TSTypeAssertion
  • Deno.lint.TSTypeLiteral
  • Deno.lint.TSTypeOperator
  • Deno.lint.TSTypeParameter
  • Deno.lint.TSTypeParameterDeclaration
  • Deno.lint.TSTypeParameterInstantiation
  • Deno.lint.TSTypePredicate
  • Deno.lint.TSTypeQuery
  • Deno.lint.TSTypeReference
  • Deno.lint.TSUndefinedKeyword
  • Deno.lint.TSUnionType
  • Deno.lint.TSUnknownKeyword
  • Deno.lint.TSVoidKeyword
  • Deno.lint.UnaryExpression

    Apply operand on value based on the specified operator.

  • Deno.lint.UpdateExpression

    Syntactic sugar to increment or decrement a value.

  • Deno.lint.VariableDeclaration

    Variable declaration.

  • Deno.lint.VariableDeclarator

    A VariableDeclaration can declare multiple variables. This node represents a single declaration out of that.

  • Deno.lint.WhileStatement

    Run a loop while the test expression is truthy.

  • Deno.lint.YieldExpression

    Pause or resume a generator function.

  • Deno.lint.WithStatement

    Legacy JavaScript feature, that's discouraged from being used today.

  • Deno.lint
  • Deno.lint.Accessibility

    TypeScript accessibility modifiers used in classes

  • Deno.lint.Expression

    Union type of all possible expression nodes

  • Deno.lint.JSXChild

    Union type of all possible child nodes in JSX

  • Deno.lint.LintVisitor
  • Deno.lint.Literal

    Union type of all Literals

  • Deno.lint.Node

    Union type of all possible AST nodes

  • Deno.lint.Parameter

    Function/Method parameter

  • Deno.lint.Range
  • Deno.lint.Statement

    Union type of all possible statement nodes

  • Deno.lint.TypeNode

    Union type of all possible type nodes in TypeScript

Network

  • Deno.QuicEndpoint
  • Deno.connect

    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.connectQuic

    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.connectTls

    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.listen

    Listen announces on the local transport address.

  • Deno.listenDatagram

    Listen announces on the local transport address.

  • Deno.listenTls

    Listen announces on the local transport address over TLS (transport layer security).

  • Deno.networkInterfaces

    Returns an array of the network interface information.

  • Deno.resolveDns

    Performs DNS resolution against the given query, returning resolved records.

  • Deno.startTls

    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.upgradeWebTransport

    Upgrade a QUIC connection into a WebTransport instance.

  • Deno.CaaRecord

    If Deno.resolveDns is called with "CAA" record type specified, it will resolve with an array of objects with this interface.

  • Deno.Conn

    A generic stream-oriented network connection that can be read from and written to.

  • Deno.ConnectOptions

    Options which can be set when connecting via Deno.connect.

  • Deno.ConnectQuicOptions
  • Deno.ConnectTlsOptions

    Options which can be set when establishing a TLS connection via Deno.connectTls.

  • Deno.DatagramConn

    A generic transport listener for message-oriented protocols.

  • Deno.Listener

    A generic network listener for stream-oriented protocols.

  • Deno.ListenOptions

    Options which can be set when opening a listener via Deno.listen.

  • Deno.ListenTlsOptions

    Options which can be set when opening a TLS listener via Deno.listenTls.

  • Deno.MulticastV4Membership

    Represents membership of a IPv4 multicast group.

  • Deno.MulticastV6Membership

    Represents membership of a IPv6 multicast group.

  • Deno.MxRecord

    If Deno.resolveDns is called with "MX" record type specified, it will return an array of objects with this interface.

  • Deno.NaptrRecord

    If Deno.resolveDns is called with "NAPTR" record type specified, it will return an array of objects with this interface.

  • Deno.NetAddr

    The address of a network connection or listener using an IP-based transport.

  • Deno.NetworkInterfaceInfo

    The information for a network interface returned from a call to Deno.networkInterfaces.

  • Deno.QuicAcceptOptions
  • Deno.QuicBidirectionalStream
  • Deno.QuicCloseInfo
  • Deno.QuicConn
  • Deno.QuicEndpointOptions
  • Deno.QuicIncoming

    An incoming connection for which the server has not yet begun its part of the handshake.

  • Deno.QuicListener

    Specialized listener that accepts QUIC connections.

  • Deno.QuicListenOptions
  • Deno.QuicReceiveStream
  • Deno.QuicSendStream
  • Deno.QuicSendStreamOptions
  • Deno.QuicServerTransportOptions
  • Deno.QuicTransportOptions
  • Deno.ResolveDnsOptions

    Options which can be set when using Deno.resolveDns.

  • Deno.SoaRecord

    If Deno.resolveDns is called with "SOA" record type specified, it will return an array of objects with this interface.

  • Deno.SrvRecord

    If Deno.resolveDns is called with "SRV" record type specified, it will return an array of objects with this interface.

  • Deno.StartTlsOptions

    Options which can be set when upgrading an existing connection to TLS via Deno.startTls.

  • Deno.TcpConn

    A TCP stream connection.

  • Deno.TcpListenOptions
  • Deno.TlsCertifiedKeyPem

    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.

  • Deno.TlsConn

    A TLS-encrypted stream connection over an IP-based transport.

  • Deno.TlsHandshakeInfo

    Information about a completed TLS handshake.

  • Deno.UdpListenOptions

    Unstable options which can be set when opening a datagram listener via Deno.listenDatagram.

  • Deno.UnixAddr

    The address of a network connection or listener using a Unix domain socket.

  • Deno.UnixConn

    A Unix domain socket stream connection.

  • Deno.UnixConnectOptions

    Options which can be set when connecting to a Unix domain socket via Deno.connect.

  • Deno.UnixListenDatagramOptions

    Unstable options which can be set when opening a unixpacket datagram listener via Deno.listenDatagram.

  • Deno.UnixListenOptions

    Options which can be set when opening a Unix listener via Deno.listen or Deno.listenDatagram.

  • Deno.VsockAddr

    The address of a network connection or listener using the VSOCK transport for communication between a virtual machine and its host.

  • Deno.VsockConn

    A VSOCK stream connection.

  • Deno.VsockConnectOptions

    Options which can be set when connecting over VSOCK via Deno.connect.

  • Deno.VsockListenOptions

    Options which can be set when opening a VSOCK listener via Deno.listen.

  • Deno.Addr

    The address of a network connection or listener, regardless of transport.

  • Deno.RecordType

    The type of the resource record to resolve via DNS using Deno.resolveDns.

  • Deno.TcpListener

    Specialized listener that accepts TCP connections.

  • Deno.TlsListener

    Specialized listener that accepts TLS connections.

  • Deno.UnixListener

    Specialized listener that accepts Unix connections.

  • Deno.VsockListener

    Specialized listener that accepts VSOCK connections.

Permissions

  • Deno.Permissions

    Deno's permission management API.

  • Deno.PermissionStatus

    An EventTarget returned from the Deno.permissions API which can provide updates to any state changes of the permission.

  • Deno.EnvPermissionDescriptor

    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.

  • Deno.FfiPermissionDescriptor

    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.

  • Deno.ImportPermissionDescriptor

    The permission descriptor for the allow-import and deny-import permissions, which controls access to importing from remote hosts via the network. The option host allows scoping the permission for outbound connection to a specific host and port.

  • Deno.NetPermissionDescriptor

    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.

  • Deno.PermissionOptionsObject

    A set of options which can define the permissions within a test or worker context at a highly specific level.

  • Deno.PermissionStatusEventMap

    The interface which defines what event types are supported by PermissionStatus instances.

  • Deno.ReadPermissionDescriptor

    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).

  • Deno.RunPermissionDescriptor

    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.

  • Deno.SysPermissionDescriptor

    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.

  • Deno.WritePermissionDescriptor

    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).

  • Deno.PermissionDescriptor

    Permission descriptors which define a permission and can be queried, requested, or revoked.

  • Deno.PermissionName

    The name of a privileged feature which needs permission.

  • Deno.PermissionOptions

    Options which define the permissions within a test or worker context.

  • Deno.PermissionState

    The current status of the permission:

  • Deno.permissions

    Deno's permission management API.

Runtime

  • Deno.addSignalListener

    Registers the given function as a listener of the given signal event.

  • Deno.chdir

    Change the current working directory to the specified path.

  • Deno.cwd

    Return a string representing the current working directory.

  • Deno.execPath

    Returns the path to the current deno executable.

  • Deno.exit

    Exit the Deno process with optional exit code.

  • Deno.gid

    Returns the group id of the process on POSIX platforms. Returns null on windows.

  • Deno.hostname

    Get the hostname of the machine the Deno process is running on.

  • Deno.loadavg

    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.memoryUsage

    Returns an object describing the memory usage of the Deno process and the V8 subsystem measured in bytes.

  • Deno.osRelease

    Returns the release version of the Operating System.

  • Deno.osUptime

    Returns the Operating System uptime in number of seconds.

  • Deno.refTimer

    Make the timer of the given id block the event loop from finishing.

  • Deno.removeSignalListener

    Removes the given signal listener that has been registered with Deno.addSignalListener.

  • Deno.systemMemoryInfo

    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.uid

    Returns the user id of the process on POSIX platforms. Returns null on Windows.

  • Deno.unrefTimer

    Make the timer of the given id not block the event loop from finishing.

  • Deno.Env

    An interface containing methods to interact with the process environment variables.

  • Deno.MemoryUsage
  • Deno.SystemMemoryInfo

    Information returned from a call to Deno.systemMemoryInfo.

  • Deno.Signal

    Operating signals which can be listened for or sent to sub-processes. What signals and what their standard behaviors are OS dependent.

  • Deno.args

    Returns the script arguments to the program.

  • Deno.build

    Information related to the build of the current Deno runtime.

  • Deno.env

    An interface containing methods to interact with the process environment variables.

  • Deno.exitCode

    The exit code for the Deno process.

  • Deno.mainModule

    The URL of the entrypoint module entered from the command-line. It requires read permission to the CWD.

  • Deno.noColor

    Reflects the NO_COLOR environment variable at program start.

  • Deno.pid

    The current process ID of this instance of the Deno CLI.

  • Deno.ppid

    The process ID of parent process of this instance of the Deno CLI.

  • Deno.version

    Version information related to the current Deno CLI runtime environment.

Subprocess

  • Deno.ChildProcess

    The interface for handling a child process returned from Deno.Command.spawn.

  • Deno.Command

    Create a child process.

  • Deno.kill

    Send a signal to process under given pid. The value and meaning of the signal to the process is operating system and process dependant. Signal provides the most common signals. Default signal is "SIGTERM".

  • Deno.spawn

    Spawns a new subprocess, returning a Deno.ChildProcess handle.

  • Deno.spawnAndWait

    Spawns a subprocess, waits for it to finish, and returns the output.

  • Deno.spawnAndWaitSync

    Synchronously spawns a subprocess, waits for it to finish, and returns the output.

  • Deno.CommandOptions

    Options which can be set when calling Deno.Command.

  • Deno.CommandOutput

    The interface returned from calling Deno.Command.output or Deno.Command.outputSync which represents the result of spawning the child process.

  • Deno.CommandStatus
  • Deno.SubprocessReadableStream

    The interface for stdout and stderr streams for child process returned from Deno.Command.spawn.

Telemetry

  • Deno.telemetry

    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.contextManager

    A ContextManager compatible with OpenTelemetry.js https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.ContextManager.html

  • Deno.telemetry.meterProvider

    A MeterProvider compatible with OpenTelemetry.js https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.MeterProvider.html

  • Deno.telemetry.tracerProvider

    A TracerProvider compatible with OpenTelemetry.js https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.TracerProvider.html

Testing

  • Deno.bench

    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.

  • Deno.BenchContext

    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.BenchDefinition

    The interface for defining a benchmark test using Deno.bench.

  • Deno.DenoTest
  • Deno.TestContext

    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.TestDefinition
  • Deno.TestEach

    Register a parameterized group of tests. See DenoTest.each.

  • Deno.TestIgnore

    Shorthand property for ignoring a particular test case. See DenoTest.ignore.

  • Deno.TestOnly

    Shorthand property for focusing a particular test case. See DenoTest.only.

  • Deno.TestSnapshotOptions

    Options which can be set when calling Deno.TestContext.assertSnapshot.

  • Deno.TestStepDefinition
  • Deno.test

    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.

WebSockets

  • Deno.upgradeWebSocket

    Upgrade an incoming HTTP request to a WebSocket.

  • Deno.UpgradeWebSocketOptions

    Options which can be set when performing a Deno.upgradeWebSocket upgrade of a Request

  • Deno.WebSocketUpgrade

    The object that is returned from a Deno.upgradeWebSocket request.

Other APIs

  • Deno

    The global namespace where Deno specific, non-standard APIs are located.

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/api/deno

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API