Skip to content

Commit

Permalink
chore: deprecate Deno.Reader, Deno.ReaderSync, Deno.Writer, `De…
Browse files Browse the repository at this point in the history
…no.WriterSync` and `Deno.Closer` (#21465)

This change deprecates `Deno.Reader`, `Deno.ReaderSync`, `Deno.Writer`,
`Deno.WriterSync` and `Deno.Closer` in favour of the [Web Streams
API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API).
After discussing with Yoshiya, we both thought now might be the right
time to deprecate these interfaces with v2 getting closer.
  • Loading branch information
iuioiua authored Dec 13, 2023
1 parent 6ebe4c2 commit a3fc93a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to read
* bytes into an array buffer asynchronously.
*
* @deprecated Use {@linkcode ReadableStream} instead. {@linkcode Reader}
* will be removed in v2.0.0.
*
* @category I/O */
export interface Reader {
/** Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
Expand Down Expand Up @@ -1658,6 +1661,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to read
* bytes into an array buffer synchronously.
*
* @deprecated Use {@linkcode ReadableStream} instead. {@linkcode ReaderSync}
* will be removed in v2.0.0.
*
* @category I/O */
export interface ReaderSync {
/** Reads up to `p.byteLength` bytes into `p`. It resolves to the number
Expand Down Expand Up @@ -1692,6 +1698,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to write
* bytes from an array buffer to a file/resource asynchronously.
*
* @deprecated Use {@linkcode WritableStream} instead. {@linkcode Writer}
* will be removed in v2.0.0.
*
* @category I/O */
export interface Writer {
/** Writes `p.byteLength` bytes from `p` to the underlying data stream. It
Expand All @@ -1716,6 +1725,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to write
* bytes from an array buffer to a file/resource synchronously.
*
* @deprecated Use {@linkcode WritableStream} instead. {@linkcode WriterSync}
* will be removed in v2.0.0.
*
* @category I/O */
export interface WriterSync {
/** Writes `p.byteLength` bytes from `p` to the underlying data
Expand All @@ -1734,6 +1746,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to close
* files/resources that were previously opened.
*
* @deprecated Use {@linkcode ReadableStream} and {@linkcode WritableStream}
* instead. {@linkcode Closer} will be removed in v2.0.0.
*
* @category I/O */
export interface Closer {
/** Closes the resource, "freeing" the backing file/resource. */
Expand Down

0 comments on commit a3fc93a

Please sign in to comment.