mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
refactor: set removal version for Deno.Server
(#22024)
This change sets the removal version for the deprecated `Deno.Server` interface for Deno 2.0. Towards #22021
This commit is contained in:
parent
f2b0424df6
commit
6059731594
3 changed files with 5 additions and 3 deletions
|
@ -3815,7 +3815,7 @@ async function curlRequestWithStdErr(args: string[]) {
|
|||
return [new TextDecoder().decode(stdout), new TextDecoder().decode(stderr)];
|
||||
}
|
||||
|
||||
Deno.test("Deno.Server is not thenable", async () => {
|
||||
Deno.test("Deno.HttpServer is not thenable", async () => {
|
||||
// deno-lint-ignore require-await
|
||||
async function serveTest() {
|
||||
const server = Deno.serve({ port: servePort }, (_) => new Response(""));
|
||||
|
|
4
cli/tsc/dts/lib.deno.ns.d.ts
vendored
4
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -6043,7 +6043,9 @@ declare namespace Deno {
|
|||
|
||||
/**
|
||||
* @category HTTP Server
|
||||
* @deprecated Use {@linkcode HttpServer} instead.
|
||||
*
|
||||
* @deprecated Use {@linkcode Deno.HttpServer} instead.
|
||||
* {@linkcode Deno.Server} will be removed in Deno 2.0.
|
||||
*/
|
||||
export type Server = HttpServer;
|
||||
|
||||
|
|
|
@ -1575,7 +1575,7 @@ export class ServerImpl extends EventEmitter {
|
|||
|
||||
#addr: Deno.NetAddr;
|
||||
#hasClosed = false;
|
||||
#server: Deno.Server;
|
||||
#server: Deno.HttpServer;
|
||||
#unref = false;
|
||||
#ac?: AbortController;
|
||||
#serveDeferred: ReturnType<typeof Promise.withResolvers<void>>;
|
||||
|
|
Loading…
Reference in a new issue