From ba8bbe6f1c11d4cf19ad0b916ba41cd919dbb042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 11 Sep 2021 02:54:37 +0200 Subject: refactor: use Deno.core.tryClose (#11980) --- core/lib.deno_core.d.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/lib.deno_core.d.ts') diff --git a/core/lib.deno_core.d.ts b/core/lib.deno_core.d.ts index 2c69782a6..46cf6b42c 100644 --- a/core/lib.deno_core.d.ts +++ b/core/lib.deno_core.d.ts @@ -33,9 +33,18 @@ declare namespace Deno { */ function resources(): Record; - /** Close the resource with the specified op id. */ + /** + * Close the resource with the specified op id. Throws `BadResource` error + * if resource doesn't exist in resource table. + */ function close(rid: number): void; + /** + * Try close the resource with the specified op id; if resource with given + * id doesn't exist do nothing. + */ + function tryClose(rid: number): void; + /** Get heap stats for current isolate/worker */ function heapStats(): Record; -- cgit v1.2.3