diff options
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 2 | ||||
-rw-r--r-- | runtime/js/40_http.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 54869e15a..f7ed18780 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -1158,7 +1158,7 @@ declare namespace Deno { export interface RequestEvent { readonly request: Request; - respondWith(r: Response | Promise<Response>): void; + respondWith(r: Response | Promise<Response>): Promise<void>; } export interface HttpConn extends AsyncIterable<RequestEvent> { diff --git a/runtime/js/40_http.js b/runtime/js/40_http.js index 18ead84c3..6b9d3dca6 100644 --- a/runtime/js/40_http.js +++ b/runtime/js/40_http.js @@ -106,8 +106,8 @@ return array; } - function createRespondWith(responseSenderRid, connRid) { - return async function (resp) { + function createRespondWith(responseSenderRid) { + return async function respondWith(resp) { if (resp instanceof Promise) { resp = await resp; } |