From bf2473d384ea4b9a0c5e09e046a263c6a31009d7 Mon Sep 17 00:00:00 2001 From: RA80533 <32469082+RA80533@users.noreply.github.com> Date: Sat, 5 Jun 2021 04:14:29 -0400 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/38939 Reviewed-By: Anna Henningsen Reviewed-By: Darshan Sen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Zijian Liu --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 72846087466251..2f0ed06a15a97e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -402,7 +402,7 @@ try { filehandle = await open('temp.txt', 'r+'); await filehandle.truncate(4); } finally { - filehandle?.close(); + await filehandle?.close(); } ```