diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-04-27 18:23:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-27 11:23:18 +0200 |
commit | 4fa0e9c652a43516f717b30d9932cb9f64716b09 (patch) | |
tree | 31379f54a2fc5aa7cbf851c78827e15a896896da | |
parent | 299518d9357ca81efa12f295f65086708f392531 (diff) |
docs: fix ftruncateSync example (#10393)
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 5 |
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 |