From 77c5a336adde9cdf7c0ce35dd24f83f1a887570e Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 9 Jul 2024 16:57:27 +1000 Subject: [PATCH] docs(ext/net): explain `port: 0` behavior (#24475) --- cli/tsc/dts/lib.deno.ns.d.ts | 2 ++ ext/net/lib.deno_net.d.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index f6befc72ba..c3a80e6db2 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -6257,6 +6257,8 @@ declare namespace Deno { */ export interface ServeOptions { /** The port to listen on. + * + * Set to `0` to listen on any available port. * * @default {8000} */ port?: number; diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index f036bcd39a..13fbd35148 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -135,7 +135,10 @@ declare namespace Deno { /** @category Network */ export interface ListenOptions { - /** The port to listen on. */ + /** The port to listen on. + * + * Set to `0` to listen on any available port. + */ port: number; /** A literal IP address or host name that can be resolved to an IP address. *