mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
fix Deno.iterSync() examples (#4855)
This commit is contained in:
parent
e26c2cd7c8
commit
197a589a4a
1 changed files with 2 additions and 2 deletions
4
cli/js/lib.deno.ns.d.ts
vendored
4
cli/js/lib.deno.ns.d.ts
vendored
|
@ -607,7 +607,7 @@ declare namespace Deno {
|
||||||
/** **UNSTABLE**: new API, yet to be vetted
|
/** **UNSTABLE**: new API, yet to be vetted
|
||||||
* Turns a SyncReader, `r`, into an iterator.
|
* Turns a SyncReader, `r`, into an iterator.
|
||||||
*
|
*
|
||||||
* let f = await open("/etc/passwd");
|
* let f = openSync("/etc/passwd");
|
||||||
* for (const chunk of iterSync(reader)) {
|
* for (const chunk of iterSync(reader)) {
|
||||||
* console.log(chunk);
|
* console.log(chunk);
|
||||||
* }
|
* }
|
||||||
|
@ -616,7 +616,7 @@ declare namespace Deno {
|
||||||
* Second argument can be used to tune size of a buffer.
|
* Second argument can be used to tune size of a buffer.
|
||||||
* Default size of the buffer is 1024 bytes.
|
* Default size of the buffer is 1024 bytes.
|
||||||
*
|
*
|
||||||
* let f = await open("/etc/passwd");
|
* let f = openSync("/etc/passwd");
|
||||||
* for (const chunk of iterSync(reader, 1024 * 1024)) {
|
* for (const chunk of iterSync(reader, 1024 * 1024)) {
|
||||||
* console.log(chunk);
|
* console.log(chunk);
|
||||||
* }
|
* }
|
||||||
|
|
Loading…
Reference in a new issue