diff options
Diffstat (limited to 'ext/net/lib.deno_net.d.ts')
-rw-r--r-- | ext/net/lib.deno_net.d.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index e77b1bc6f..c019c8d61 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -138,6 +138,32 @@ declare namespace Deno { options: TcpListenOptions & { transport?: "tcp" }, ): Listener; + /** Options which can be set when opening a Unix listener via + * {@linkcode Deno.listen} or {@linkcode Deno.listenDatagram}. + * + * @category Network + */ + export interface UnixListenOptions { + /** A path to the Unix Socket. */ + path: string; + } + + /** Listen announces on the local transport address. + * + * ```ts + * const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" }) + * ``` + * + * Requires `allow-read` and `allow-write` permission. + * + * @tags allow-read, allow-write + * @category Network + */ + // deno-lint-ignore adjacent-overload-signatures + export function listen( + options: UnixListenOptions & { transport: "unix" }, + ): Listener; + /** @category Network */ export interface ListenTlsOptions extends TcpListenOptions { /** Server private key in PEM format */ |