mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
docs(cli/dts): use one block per writeAll example (#10496)
This commit is contained in:
parent
9c206545f7
commit
a16a830e33
1 changed files with 8 additions and 0 deletions
8
cli/dts/lib.deno.ns.d.ts
vendored
8
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -989,13 +989,17 @@ declare namespace Deno {
|
|||
* // Example writing to stdout
|
||||
* const contentBytes = new TextEncoder().encode("Hello World");
|
||||
* await Deno.writeAll(Deno.stdout, contentBytes);
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* // Example writing to file
|
||||
* const contentBytes = new TextEncoder().encode("Hello World");
|
||||
* const file = await Deno.open('test.file', {write: true});
|
||||
* await Deno.writeAll(file, contentBytes);
|
||||
* Deno.close(file.rid);
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* // Example writing to buffer
|
||||
* const contentBytes = new TextEncoder().encode("Hello World");
|
||||
* const writer = new Deno.Buffer();
|
||||
|
@ -1015,13 +1019,17 @@ declare namespace Deno {
|
|||
* // Example writing to stdout
|
||||
* const contentBytes = new TextEncoder().encode("Hello World");
|
||||
* Deno.writeAllSync(Deno.stdout, contentBytes);
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* // Example writing to file
|
||||
* const contentBytes = new TextEncoder().encode("Hello World");
|
||||
* const file = Deno.openSync('test.file', {write: true});
|
||||
* Deno.writeAllSync(file, contentBytes);
|
||||
* Deno.close(file.rid);
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* // Example writing to buffer
|
||||
* const contentBytes = new TextEncoder().encode("Hello World");
|
||||
* const writer = new Deno.Buffer();
|
||||
|
|
Loading…
Reference in a new issue