summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
diff options
context:
space:
mode:
author精武陈真 <546369005@qq.com>2020-06-01 21:53:43 +0800
committerGitHub <noreply@github.com>2020-06-01 09:53:43 -0400
commitf0ba814a79fe4f0791c4b0ef496a704356597467 (patch)
tree78a44f12c73a8cc267d3de4cf4fa5effe5eb860c /cli/js/lib.deno.ns.d.ts
parent29db4104c4b05d7eff3a5d74514db0904ea1cd98 (diff)
fix jsDoc (#5992)
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r--cli/js/lib.deno.ns.d.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts
index 74f1a2e15..be4b1f15d 100644
--- a/cli/js/lib.deno.ns.d.ts
+++ b/cli/js/lib.deno.ns.d.ts
@@ -364,7 +364,7 @@ declare namespace Deno {
*
* ```ts
* let f = Deno.openSync("/etc/passwd");
- * for (const chunk of Deno.iterSync(reader)) {
+ * for (const chunk of Deno.iterSync(f)) {
* console.log(chunk);
* }
* f.close();
@@ -509,7 +509,7 @@ declare namespace Deno {
* ```ts
* const encoder = new TextEncoder();
* const data = encoder.encode("Hello world");
- * const file = Deno.openSync("/foo/bar.txt");
+ * const file = Deno.openSync("/foo/bar.txt", {write: true});
* const bytesWritten = Deno.writeSync(file.rid, data); // 11
* Deno.close(file.rid);
* ```
@@ -528,7 +528,7 @@ declare namespace Deno {
* ```ts
* const encoder = new TextEncoder();
* const data = encoder.encode("Hello world");
- * const file = await Deno.open("/foo/bar.txt");
+ * const file = await Deno.open("/foo/bar.txt", { write: true });
* const bytesWritten = await Deno.write(file.rid, data); // 11
* Deno.close(file.rid);
* ```
@@ -1366,6 +1366,7 @@ declare namespace Deno {
* points to.
*
* ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
* const fileInfo = await Deno.lstat("hello.txt");
* assert(fileInfo.isFile);
* ```
@@ -1389,6 +1390,7 @@ declare namespace Deno {
* follow symlinks.
*
* ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
* const fileInfo = await Deno.stat("hello.txt");
* assert(fileInfo.isFile);
* ```
@@ -1400,6 +1402,7 @@ declare namespace Deno {
* always follow symlinks.
*
* ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
* const fileInfo = Deno.statSync("hello.txt");
* assert(fileInfo.isFile);
* ```