Skip to content

Commit 14a0ed0

Browse files
RA80533danielleadams
authored andcommitted
doc: use await in filehandle.truncate() snippet
The example snippet of filehandle.close() uses the `await` keyword based on convention. This change updates the example snippet of filehandle.truncate() to similarly use the keyword for the purposes of consistency. PR-URL: #38939 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
1 parent 7418def commit 14a0ed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/fs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ try {
402402
filehandle = await open('temp.txt', 'r+');
403403
await filehandle.truncate(4);
404404
} finally {
405-
filehandle?.close();
405+
await filehandle?.close();
406406
}
407407
```
408408

0 commit comments

Comments
 (0)