mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 05:05:08 +00:00
BREAKING CHANGE: change order of args in Deno.copy() (#4885)
This commit is contained in:
parent
833539fcaf
commit
0cb1bb98cc
13 changed files with 18 additions and 19 deletions
8
cli/js/lib.deno.ns.d.ts
vendored
8
cli/js/lib.deno.ns.d.ts
vendored
|
@ -565,16 +565,16 @@ declare namespace Deno {
|
|||
*
|
||||
* const source = await Deno.open("my_file.txt");
|
||||
* const buffer = new Deno.Buffer()
|
||||
* const bytesCopied1 = await Deno.copy(Deno.stdout, source);
|
||||
* const bytesCopied2 = await Deno.copy(buffer, source);
|
||||
* const bytesCopied1 = await Deno.copy(source, Deno.stdout);
|
||||
* const bytesCopied2 = await Deno.copy(source, buffer);
|
||||
*
|
||||
* Because `copy()` is defined to read from `src` until `EOF`, it does not
|
||||
* treat an `EOF` from `read()` as an error to be reported.
|
||||
*
|
||||
* @param dst The destination to copy to
|
||||
* @param src The source to copy from
|
||||
* @param dst The destination to copy to
|
||||
*/
|
||||
export function copy(dst: Writer, src: Reader): Promise<number>;
|
||||
export function copy(src: Reader, dst: Writer): Promise<number>;
|
||||
|
||||
/** Turns a Reader, `r`, into an async iterator.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue