diff options
author | Luca Casonato <hello@lcas.dev> | 2023-10-27 14:35:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 14:35:31 +0200 |
commit | 9a97edce05ba3719ae3ace41df2b49e9168c1fa9 (patch) | |
tree | 56db9500942ede6f4d939de3c6d4e67533c3eb3a | |
parent | 33565e16ca0f9d2d04e2c43b7f6949106ba8cf18 (diff) |
feat: rename Deno.Server to Deno.HttpServer (#20842)
Keeps the old name around for backwards compat.
Closes #20840
-rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 14 | ||||
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 6784ee052..e51e9736a 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -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; } diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 76e8ef49b..56188f3b8 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -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. */ |