summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-24 10:27:29 +1100
committerGitHub <noreply@github.com>2024-01-24 00:27:29 +0100
commit947ce41e99637dae4cf46126b8bb2d4107fb9913 (patch)
tree094cdca89b38d358bb801702b4caf5dcb6374c80 /runtime/js/99_main.js
parent4eedac3604dad9f366d28868077eb02eddc22661 (diff)
feat: deprecate `Deno.resources()` (#22059)
Most uses of `Deno.resources()` within tests, as they previously checked for leaked resources. This is not needed as the test runner does this automatically. Other internal uses of this API have been replaced with the internal `Deno[Deno.internal].core.resources()`.
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index a038de518..255c5fb6a 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -534,7 +534,10 @@ const internalSymbol = Symbol("Deno.internal");
const finalDenoNs = {
internal: internalSymbol,
[internalSymbol]: internals,
- resources: core.resources,
+ resources() {
+ internals.warnOnDeprecatedApi("Deno.resources()", new Error().stack);
+ return core.resources();
+ },
close: core.close,
...denoNs,
// Deno.test and Deno.bench are noops here, but kept for compatibility; so