summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2021-04-27 18:23:18 +0900
committerGitHub <noreply@github.com>2021-04-27 11:23:18 +0200
commit4fa0e9c652a43516f717b30d9932cb9f64716b09 (patch)
tree31379f54a2fc5aa7cbf851c78827e15a896896da /cli/dts/lib.deno.ns.d.ts
parent299518d9357ca81efa12f295f65086708f392531 (diff)
docs: fix ftruncateSync example (#10393)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index bb2442ccd..c8ab9918d 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -2357,9 +2357,10 @@ declare namespace Deno {
* Deno.ftruncateSync(file.rid);
*
* // truncate part of the file
- * const file = Deno.open("my_file.txt", { read: true, write: true, create: true });
- * Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * const file = Deno.openSync("my_file.txt", { read: true, write: true, create: true });
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World"));
* Deno.ftruncateSync(file.rid, 7);
+ * Deno.seekSync(file.rid, 0, Deno.SeekMode.Start);
* const data = new Uint8Array(32);
* Deno.readSync(file.rid, data);
* console.log(new TextDecoder().decode(data)); // Hello W