summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
diff options
context:
space:
mode:
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);
* ```