BREAKING: remove Deno.close() (#25347)

Towards #22079
This commit is contained in:
Asher Gomez 2024-09-03 18:33:26 +10:00 committed by GitHub
parent e49d80e500
commit 259752537f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 0 additions and 51 deletions

View file

@ -518,14 +518,6 @@ const internalSymbol = Symbol("Deno.internal");
const finalDenoNs = {
internal: internalSymbol,
[internalSymbol]: internals,
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`
@ -822,7 +814,6 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
if (future) {
delete globalThis.window;
delete Deno.Buffer;
delete Deno.close;
delete Deno.copy;
delete Deno.File;
delete Deno.fstat;
@ -1005,7 +996,6 @@ function bootstrapWorkerRuntime(
if (future) {
delete Deno.Buffer;
delete Deno.close;
delete Deno.copy;
delete Deno.File;
delete Deno.fstat;