mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
docs: document how to stop file watcher (#10403)
This commit is contained in:
parent
3a03084580
commit
8c6f977192
1 changed files with 10 additions and 0 deletions
10
cli/dts/lib.deno.ns.d.ts
vendored
10
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -1947,6 +1947,16 @@ declare namespace Deno {
|
|||
*```
|
||||
*
|
||||
* Requires `allow-read` permission.
|
||||
*
|
||||
* Call `watcher.return()` to stop watching.
|
||||
*
|
||||
* ```ts
|
||||
* const watcher = Deno.watchFs("/");
|
||||
* setTimeout(() => { watcher.return(); }, 5000);
|
||||
* for await (const event of watcher) {
|
||||
* console.log(">>>> event", event);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function watchFs(
|
||||
paths: string | string[],
|
||||
|
|
Loading…
Reference in a new issue