Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.ns.d.ts>Deno.NetPermissionDescriptor

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface Deno.NetPermissionDescriptor
import { type Deno } from "https://deno.land/x/deno@v1.28.3/cli/tsc/dts/lib.deno.ns.d.ts";
const { NetPermissionDescriptor } = Deno;

The permission descriptor for the allow-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.

Properties

name: "net"
optional
host: string

Optional host string of the form "<hostname>[:<port>]". Examples:

 "github.com"
 "deno.land:8080"