diff options
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 7057f6d62..fe3dab58b 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -542,7 +542,14 @@ const finalDenoNs = { internals.warnOnDeprecatedApi("Deno.resources()", new Error().stack); return core.resources(); }, - close: core.close, + close(rid) { + internals.warnOnDeprecatedApi( + "Deno.close()", + new Error().stack, + "Use `closer.close()` instead.", + ); + core.close(rid); + }, ...denoNs, // Deno.test and Deno.bench are noops here, but kept for compatibility; so // that they don't cause errors when used outside of `deno test`/`deno bench` |