mirror of
https://github.com/denoland/deno.git
synced 2025-01-08 15:19:40 -05:00
docs(cli/dts): add missing awaits (#10501)
This commit is contained in:
parent
d654e78e0d
commit
49c4d57b0f
1 changed files with 2 additions and 2 deletions
4
cli/dts/lib.deno.ns.d.ts
vendored
4
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -2401,13 +2401,13 @@ declare namespace Deno {
|
|||
*
|
||||
* ```ts
|
||||
* // truncate the entire file
|
||||
* const file = Deno.open("my_file.txt", { read: true, write: true, create: true });
|
||||
* const file = await Deno.open("my_file.txt", { read: true, write: true, create: true });
|
||||
* await Deno.ftruncate(file.rid);
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* // truncate part of the file
|
||||
* const file = Deno.open("my_file.txt", { read: true, write: true, create: true });
|
||||
* const file = await Deno.open("my_file.txt", { read: true, write: true, create: true });
|
||||
* await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
|
||||
* await Deno.ftruncate(file.rid, 7);
|
||||
* const data = new Uint8Array(32);
|
||||
|
|
Loading…
Reference in a new issue