Skip to content

Commit

Permalink
doc: use await in filehandle.truncate() snippet
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
RA80533 authored and Lxxyx committed Jun 11, 2021
1 parent 3ab6360 commit bf2473d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ try {
filehandle = await open('temp.txt', 'r+');
await filehandle.truncate(4);
} finally {
filehandle?.close();
await filehandle?.close();
}
```
Expand Down

0 comments on commit bf2473d

Please sign in to comment.