mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
docs(cli/dts): fix Deno.watchFs example (#10570)
This commit is contained in:
parent
ba8d6ec771
commit
2b8bac3c85
1 changed files with 7 additions and 1 deletions
8
cli/dts/lib.deno.ns.d.ts
vendored
8
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -1970,7 +1970,13 @@ declare namespace Deno {
|
|||
*
|
||||
* ```ts
|
||||
* const watcher = Deno.watchFs("/");
|
||||
* setTimeout(() => { watcher.return(); }, 5000);
|
||||
*
|
||||
* setTimeout(() => {
|
||||
* if (watcher.return) {
|
||||
* watcher.return();
|
||||
* }
|
||||
* }, 5000);
|
||||
*
|
||||
* for await (const event of watcher) {
|
||||
* console.log(">>>> event", event);
|
||||
* }
|
||||
|
|
Loading…
Add table
Reference in a new issue