summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-05-11 10:18:29 +0800
committerGitHub <noreply@github.com>2021-05-11 11:18:29 +0900
commit2b8bac3c85d90de44c00677b015f69fd445c1489 (patch)
treeabc83641e85641bfc31f9a009eefe8f07a29d232 /cli
parentba8d6ec771a7094eb7df3e8f19c91709f9935379 (diff)
docs(cli/dts): fix Deno.watchFs example (#10570)
Diffstat (limited to 'cli')
-rw-r--r--cli/dts/lib.deno.ns.d.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index 5a7eedfd1..f6b0c0de8 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -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);
* }