From 6745bdaa85663b3ca8d0b878a34bd4db6ff99b23 Mon Sep 17 00:00:00 2001 From: Amdadul Haq Date: Tue, 2 Dec 2025 03:43:14 +0600 Subject: [PATCH] Add protocol property to serve.d.ts (#25267) --- packages/bun-types/serve.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/bun-types/serve.d.ts b/packages/bun-types/serve.d.ts index 78b0eea3d4..2558bb5944 100644 --- a/packages/bun-types/serve.d.ts +++ b/packages/bun-types/serve.d.ts @@ -1082,6 +1082,15 @@ declare module "bun" { */ readonly hostname: string | undefined; + /** + * The protocol the server is listening on. + * + * - "http" for normal servers + * - "https" when TLS is enabled + * - null for unix sockets or when unavailable + */ + readonly protocol: "http" | "https" | null; + /** * Is the server running in development mode? *