summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-07-09 16:57:27 +1000
committerGitHub <noreply@github.com>2024-07-09 16:57:27 +1000
commit77c5a336adde9cdf7c0ce35dd24f83f1a887570e (patch)
tree4aa59a2d4720719d8114bac191811f39c0bc43b0
parentc3b168f5a2a076af011cb7eae0674b52075fb094 (diff)
docs(ext/net): explain `port: 0` behavior (#24475)
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts2
-rw-r--r--ext/net/lib.deno_net.d.ts5
2 files changed, 6 insertions, 1 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index f6befc72b..c3a80e6db 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -6258,6 +6258,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 f036bcd39..13fbd3514 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.
*