summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/lib.deno_core.d.ts11
1 files changed, 10 insertions, 1 deletions
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<string, string>;
- /** 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<string, number>;