From eed2598e6cf1db643b4edd07b5eff94c59eb9408 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Wed, 24 Apr 2024 14:03:37 -0400 Subject: feat(ext/http): Implement request.signal for Deno.serve (#23425) When the response has been successfully send, we abort the `Request.signal` property to indicate that all resources associated with this transaction may be torn down. --- cli/tsc/dts/lib.deno.unstable.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cli/tsc') diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 76656108b..0c1ab8af0 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -10,6 +10,17 @@ declare namespace Deno { export {}; // stop default export type behavior + /** Information for a HTTP request. + * + * @category HTTP Server + */ + export interface ServeHandlerInfo { + /** The remote address of the connection. */ + remoteAddr: Deno.NetAddr; + /** The completion promise */ + completed: Promise; + } + /** **UNSTABLE**: New API, yet to be vetted. * * Retrieve the process umask. If `mask` is provided, sets the process umask. -- cgit v1.2.3