mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
feat: deprecate Deno.write()
and Deno.writeSync()
(#22064)
For removal in Deno v2.
This commit is contained in:
parent
50eaeabefb
commit
a5a973e93c
5 changed files with 31 additions and 11 deletions
|
@ -140,8 +140,22 @@ const denoNs = {
|
|||
);
|
||||
return io.readSync(rid, buffer);
|
||||
},
|
||||
write: io.write,
|
||||
writeSync: io.writeSync,
|
||||
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,
|
||||
open: fs.open,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue