mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
docs(fs): fix async iterator (denoland/deno_std#366)
Original: aa94463902
This commit is contained in:
parent
80161217d3
commit
2f14376f60
1 changed files with 6 additions and 2 deletions
|
@ -152,9 +152,13 @@ for (const fileInfo of walkSync()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Async
|
// Async
|
||||||
for (const fileInfo of walk()) {
|
async function printFilesPath() {
|
||||||
console.log(fileInfo.path);
|
for await (const fileInfo of walk()) {
|
||||||
|
console.log(fileInfo.path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printFilesPath().then(() => console.log("Done!"));
|
||||||
```
|
```
|
||||||
|
|
||||||
### writeJson
|
### writeJson
|
||||||
|
|
Loading…
Reference in a new issue