summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/dts/lib.deno.ns.d.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index c8ab9918d..eaf48dade 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -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[],