Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: 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.
  • Loading branch information
RA80533 authored Jun 5, 2021
commit 9aaa5e3d44a75c011a6df0791b096e95188e4b6b
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