From dadd8b3d660fd2fd56803f29e1d8b6dd7a2adde9 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Wed, 6 Dec 2023 16:52:59 +0900 Subject: feat(ext/fetch): allow `Deno.HttpClient` to be declared with `using` (#21453) This commit adds a method of `Symbol.dispose` to the object returned from `Deno.createHttpClient`, so we can make use of [explicit resource management](https://github.com/tc39/proposal-explicit-resource-management) by declaring it with `using`. --- cli/tsc/dts/lib.deno.unstable.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 2890a50ff..bdb0493b0 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -847,7 +847,7 @@ declare namespace Deno { * * @category Fetch API */ - export interface HttpClient { + export interface HttpClient extends Disposable { /** The resource ID associated with the client. */ rid: number; /** Close the HTTP client. */ -- cgit v1.2.3