1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

Update lib.deno.ns.d.ts

Signed-off-by: ricfrst <ricardofurst06@gmail.com>
This commit is contained in:
ricfrst 2024-11-19 17:36:17 -05:00 committed by GitHub
parent 9e04c793cd
commit a65b9ba5c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1209,12 +1209,6 @@ declare namespace Deno {
} }
/** Interface for serving HTTP requests. */ /** Interface for serving HTTP requests. */
interface ServeDefaultExport {
/** The handler function to invoke when a new request is received. */
fetch: ServeHandler;
/** An optional function that is called when the server starts listening on the port. */
onListen?: (params: { hostname: string; port: number; serverType: "HTTP" | "HTTPS" }) => void;
}
/** /**
* The interface for defining a benchmark test using {@linkcode Deno.bench}. * The interface for defining a benchmark test using {@linkcode Deno.bench}.
@ -5075,14 +5069,16 @@ interface ServeDefaultExport {
*/ */
export interface ServeDefaultExport { export interface ServeDefaultExport {
/** A handler for HTTP requests. Consumes a request and returns a response. /** A handler for HTTP requests. Consumes a request and returns a response.
* *
* If a handler throws, the server calling the handler will assume the impact * If a handler throws, the server calling the handler will assume the impact
* of the error is isolated to the individual request. It will catch the error * of the error is isolated to the individual request. It will catch the error
* and if necessary will close the underlying connection. * and if necessary will close the underlying connection.
* *
* @category HTTP Server * @category HTTP Server
*/ */
fetch: ServeHandler; fetch: ServeHandler;
/** An optional function that is called when the server starts listening on the port. */
onListen?: (params: { hostname: string; port: number; serverType: "HTTP" | "HTTPS" }) => void;
} }
/** Options which can be set when calling {@linkcode Deno.serve}. /** Options which can be set when calling {@linkcode Deno.serve}.