summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts51
-rw-r--r--runtime/js/90_deno_ns.js16
-rw-r--r--runtime/js/99_main.js4
-rw-r--r--tests/specs/future/runtime_api/main.js2
-rw-r--r--tests/specs/future/runtime_api/main.out2
5 files changed, 0 insertions, 75 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index d118aca6e..bfdb80af2 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -1984,57 +1984,6 @@ declare namespace Deno {
*/
export function readSync(rid: number, buffer: Uint8Array): number | null;
- /** Write to the resource ID (`rid`) the contents of the array buffer (`data`).
- *
- * Resolves to the number of bytes written. This function is one of the lowest
- * level APIs and most users should not work with this directly, but rather
- * use {@linkcode WritableStream}, {@linkcode ReadableStream.from} and
- * {@linkcode ReadableStream.pipeTo}.
- *
- * **It is not guaranteed that the full buffer will be written in a single
- * call.**
- *
- * ```ts
- * const encoder = new TextEncoder();
- * const data = encoder.encode("Hello world");
- * using file = await Deno.open("/foo/bar.txt", { write: true });
- * const bytesWritten = await Deno.write(file.rid, data); // 11
- * ```
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- *
- * @category I/O
- */
- export function write(rid: number, data: Uint8Array): Promise<number>;
-
- /** Synchronously write to the resource ID (`rid`) the contents of the array
- * buffer (`data`).
- *
- * Returns the number of bytes written. This function is one of the lowest
- * level APIs and most users should not work with this directly, but rather
- * use {@linkcode WritableStream}, {@linkcode ReadableStream.from} and
- * {@linkcode ReadableStream.pipeTo}.
- *
- * **It is not guaranteed that the full buffer will be written in a single
- * call.**
- *
- * ```ts
- * const encoder = new TextEncoder();
- * const data = encoder.encode("Hello world");
- * using file = Deno.openSync("/foo/bar.txt", { write: true });
- * const bytesWritten = Deno.writeSync(file.rid, data); // 11
- * ```
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- *
- * @category I/O
- */
- export function writeSync(rid: number, data: Uint8Array): number;
-
/** Seek a resource ID (`rid`) to the given `offset` under mode given by `whence`.
* The call resolves to the new position within the resource (bytes from the start).
*
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index a4baedb49..9432e0719 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -103,22 +103,6 @@ const denoNs = {
);
return io.readSync(rid, buffer);
},
- write(rid, data) {
- internals.warnOnDeprecatedApi(
- "Deno.write()",
- new Error().stack,
- "Use `writer.write()` instead.",
- );
- return io.write(rid, data);
- },
- writeSync(rid, data) {
- internals.warnOnDeprecatedApi(
- "Deno.writeSync()",
- new Error().stack,
- "Use `writer.writeSync()` instead.",
- );
- return io.writeSync(rid, data);
- },
File: fs.File,
FsFile: fs.FsFile,
open: fs.open,
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index fba264af6..d771aec2b 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -809,8 +809,6 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
delete Deno.readSync;
delete Deno.seek;
delete Deno.seekSync;
- delete Deno.write;
- delete Deno.writeSync;
}
} else {
// Warmup
@@ -978,8 +976,6 @@ function bootstrapWorkerRuntime(
delete Deno.readSync;
delete Deno.seek;
delete Deno.seekSync;
- delete Deno.write;
- delete Deno.writeSync;
}
} else {
// Warmup
diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js
index f5e17a6de..a5ae5ec25 100644
--- a/tests/specs/future/runtime_api/main.js
+++ b/tests/specs/future/runtime_api/main.js
@@ -11,8 +11,6 @@ console.log("Deno.read is", Deno.read);
console.log("Deno.readSync is", Deno.readSync);
console.log("Deno.seek is", Deno.seek);
console.log("Deno.seekSync is", Deno.seekSync);
-console.log("Deno.write is", Deno.write);
-console.log("Deno.writeSync is", Deno.writeSync);
// TCP
// Since these tests may run in parallel, ensure this port is unique to this file
diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out
index e76a20265..b5886ec28 100644
--- a/tests/specs/future/runtime_api/main.out
+++ b/tests/specs/future/runtime_api/main.out
@@ -8,8 +8,6 @@ Deno.read is undefined
Deno.readSync is undefined
Deno.seek is undefined
Deno.seekSync is undefined
-Deno.write is undefined
-Deno.writeSync is undefined
Deno.Listener.prototype.rid is undefined
Deno.Conn.prototype.rid is undefined
Deno.UnixConn.prototype.rid is undefined