mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
docs: update alternative APIs for write()
, writeSync()
, read()
and readSync()
(#20792)
Closes #20701
This commit is contained in:
parent
1ff525e25b
commit
fd4fc2d818
1 changed files with 9 additions and 16 deletions
25
cli/tsc/dts/lib.deno.ns.d.ts
vendored
25
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -1877,9 +1877,8 @@ declare namespace Deno {
|
|||
* not indicate EOF.
|
||||
*
|
||||
* This function is one of the lowest level APIs and most users should not
|
||||
* work with this directly, but rather 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)
|
||||
* work with this directly, but rather use {@linkcode ReadableStream} and
|
||||
* {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer}
|
||||
* instead.
|
||||
*
|
||||
* **It is not guaranteed that the full buffer will be read in a single call.**
|
||||
|
@ -1907,10 +1906,8 @@ declare namespace Deno {
|
|||
* not indicate EOF.
|
||||
*
|
||||
* This function is one of the lowest level APIs and most users should not
|
||||
* work with this directly, but rather 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)
|
||||
* work with this directly, but rather use {@linkcode ReadableStream} and
|
||||
* {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer}
|
||||
* instead.
|
||||
*
|
||||
* **It is not guaranteed that the full buffer will be read in a single
|
||||
|
@ -1932,10 +1929,9 @@ declare namespace Deno {
|
|||
/** 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
|
||||
* [`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.
|
||||
* 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.**
|
||||
|
@ -1957,11 +1953,8 @@ declare namespace Deno {
|
|||
*
|
||||
* 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
|
||||
* [`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.
|
||||
* 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.**
|
||||
|
|
Loading…
Add table
Reference in a new issue