mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
docs: update Deno.*
deprecation notices (#21283)
This PR updates the deprecation notices to point to the same replacement APIs that the Standard Library points to. I've also tweaked the notices to be a little more presentable/navigatable. In particular, a follow-up PR in std will be made that documents the use of `toArrayBuffer()`. Closes #21193 Towards #20976
This commit is contained in:
parent
0747aef990
commit
cc5d6df50b
1 changed files with 24 additions and 37 deletions
61
cli/tsc/dts/lib.deno.ns.d.ts
vendored
61
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -1786,10 +1786,8 @@ declare namespace Deno {
|
|||
* an error occurs. It resolves to the number of bytes copied or rejects with
|
||||
* the first error encountered while copying.
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`copy`](https://deno.land/std/streams/copy.ts?s=copy) from
|
||||
* [`std/streams/copy.ts`](https://deno.land/std/streams/copy.ts)
|
||||
* instead. `Deno.copy` will be removed in the future.
|
||||
* @deprecated Use {@linkcode ReadableStream.pipeTo} instead.
|
||||
* {@linkcode Deno.copy} will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*
|
||||
|
@ -1806,11 +1804,8 @@ declare namespace Deno {
|
|||
/**
|
||||
* Turns a Reader, `r`, into an async iterator.
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`iterateReader`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReader)
|
||||
* from
|
||||
* [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts)
|
||||
* instead. `Deno.iter` will be removed in the future.
|
||||
* @deprecated Use {@linkcode ReadableStream} instead. {@linkcode Deno.iter}
|
||||
* will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
@ -1822,11 +1817,8 @@ declare namespace Deno {
|
|||
/**
|
||||
* Turns a ReaderSync, `r`, into an iterator.
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`iterateReaderSync`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReaderSync)
|
||||
* from
|
||||
* [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts)
|
||||
* instead. `Deno.iterSync` will be removed in the future.
|
||||
* @deprecated Use {@linkcode ReadableStream} instead.
|
||||
* {@linkcode Deno.iterSync} will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
@ -2497,8 +2489,9 @@ declare namespace Deno {
|
|||
/**
|
||||
* The Deno abstraction for reading and writing files.
|
||||
*
|
||||
* @deprecated Use {@linkcode Deno.FsFile} instead. `Deno.File` will be
|
||||
* removed in the future.
|
||||
* @deprecated Use {@linkcode Deno.FsFile} instead. {@linkcode Deno.File}
|
||||
* will be removed in the future.
|
||||
*
|
||||
* @category File System
|
||||
*/
|
||||
export const File: typeof FsFile;
|
||||
|
@ -2691,9 +2684,9 @@ declare namespace Deno {
|
|||
/**
|
||||
* A variable-sized buffer of bytes with `read()` and `write()` methods.
|
||||
*
|
||||
* @deprecated Use [`Buffer`](https://deno.land/std/io/buffer.ts?s=Buffer)
|
||||
* from [`std/io/buffer.ts`](https://deno.land/std/io/buffer.ts) instead.
|
||||
* `Deno.Buffer` will be removed in the future.
|
||||
* @deprecated Use the
|
||||
* [Web Streams API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Streams_API}
|
||||
* instead. {@linkcode Deno.Buffer} will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
@ -2767,10 +2760,9 @@ declare namespace Deno {
|
|||
* Read Reader `r` until EOF (`null`) and resolve to the content as
|
||||
* Uint8Array`.
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`readAll`](https://deno.land/std/streams/read_all.ts?s=readAll) from
|
||||
* [`std/streams/read_all.ts`](https://deno.land/std/streams/read_all.ts)
|
||||
* instead. `Deno.readAll` will be removed in the future.
|
||||
* @deprecated Use {@linkcode ReadableStream} and
|
||||
* [`toArrayBuffer()`](https://deno.land/std/streams/to_array_buffer.ts?s=toArrayBuffer)
|
||||
* instead. {@linkcode Deno.readAll} will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
@ -2780,11 +2772,9 @@ declare namespace Deno {
|
|||
* Synchronously reads Reader `r` until EOF (`null`) and returns the content
|
||||
* as `Uint8Array`.
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`readAllSync`](https://deno.land/std/streams/read_all.ts?s=readAllSync)
|
||||
* from
|
||||
* [`std/streams/read_all.ts`](https://deno.land/std/streams/read_all.ts)
|
||||
* instead. `Deno.readAllSync` will be removed in the future.
|
||||
* @deprecated Use {@linkcode ReadableStream} and
|
||||
* [`toArrayBuffer()`](https://deno.land/std/streams/to_array_buffer.ts?s=toArrayBuffer)
|
||||
* instead. {@linkcode Deno.readAllSync} will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
@ -2793,10 +2783,9 @@ declare namespace Deno {
|
|||
/**
|
||||
* Write all the content of the array buffer (`arr`) to the writer (`w`).
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`writeAll`](https://deno.land/std/streams/write_all.ts?s=writeAll) from
|
||||
* [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts)
|
||||
* instead. `Deno.writeAll` will be removed in the future.
|
||||
* @deprecated Use {@linkcode WritableStream}, {@linkcode ReadableStream.from}
|
||||
* and {@linkcode ReadableStream.pipeTo} instead. {@linkcode Deno.writeAll}
|
||||
* will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
@ -2806,11 +2795,9 @@ declare namespace Deno {
|
|||
* Synchronously write all the content of the array buffer (`arr`) to the
|
||||
* writer (`w`).
|
||||
*
|
||||
* @deprecated Use
|
||||
* [`writeAllSync`](https://deno.land/std/streams/write_all.ts?s=writeAllSync)
|
||||
* from
|
||||
* [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts)
|
||||
* instead. `Deno.writeAllSync` will be removed in the future.
|
||||
* @deprecated Use {@linkcode WritableStream}, {@linkcode ReadableStream.from}
|
||||
* and {@linkcode ReadableStream.pipeTo} instead.
|
||||
* {@linkcode Deno.writeAllSync} will be removed in the future.
|
||||
*
|
||||
* @category I/O
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue