mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00:00
feat: rename Deno.Server to Deno.HttpServer (#20842)
Keeps the old name around for backwards compat. Closes #20840
This commit is contained in:
parent
33565e16ca
commit
9a97edce05
14
cli/tsc/dts/lib.deno.ns.d.ts
vendored
14
cli/tsc/dts/lib.deno.ns.d.ts
vendored
@ -5911,7 +5911,7 @@ declare namespace Deno {
|
||||
*
|
||||
* @category HTTP Server
|
||||
*/
|
||||
export interface Server {
|
||||
export interface HttpServer {
|
||||
/** A promise that resolves once server finishes - eg. when aborted using
|
||||
* the signal passed to {@linkcode ServeOptions.signal}.
|
||||
*/
|
||||
@ -5929,6 +5929,12 @@ declare namespace Deno {
|
||||
unref(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @category HTTP Server
|
||||
* @deprecated Use {@linkcode HttpServer} instead.
|
||||
*/
|
||||
export type Server = HttpServer;
|
||||
|
||||
/** Serves HTTP requests with the given handler.
|
||||
*
|
||||
* The below example serves with the port `8000` on hostname `"127.0.0.1"`.
|
||||
@ -5939,7 +5945,7 @@ declare namespace Deno {
|
||||
*
|
||||
* @category HTTP Server
|
||||
*/
|
||||
export function serve(handler: ServeHandler): Server;
|
||||
export function serve(handler: ServeHandler): HttpServer;
|
||||
/** Serves HTTP requests with the given option bag and handler.
|
||||
*
|
||||
* You can specify an object with a port and hostname option, which is the
|
||||
@ -5999,7 +6005,7 @@ declare namespace Deno {
|
||||
export function serve(
|
||||
options: ServeOptions | ServeTlsOptions,
|
||||
handler: ServeHandler,
|
||||
): Server;
|
||||
): HttpServer;
|
||||
/** Serves HTTP requests with the given option bag.
|
||||
*
|
||||
* You can specify an object with a port and hostname option, which is the
|
||||
@ -6027,5 +6033,5 @@ declare namespace Deno {
|
||||
*/
|
||||
export function serve(
|
||||
options: ServeInit & (ServeOptions | ServeTlsOptions),
|
||||
): Server;
|
||||
): HttpServer;
|
||||
}
|
||||
|
2
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
2
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
@ -1941,7 +1941,7 @@ declare namespace Deno {
|
||||
*
|
||||
* @category HTTP Server
|
||||
*/
|
||||
export interface Server {
|
||||
export interface HttpServer {
|
||||
/** Gracefully close the server. No more new connections will be accepted,
|
||||
* while pending requests will be allowed to finish.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user