From f799c4617ee5199fe1a5755e754aee8ea9a68663 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 a688705c034e9b..833e9e4b7d1829 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -394,7 +394,7 @@ try { filehandle = await open('temp.txt', 'r+'); await filehandle.truncate(4); } finally { - filehandle?.close(); + await filehandle?.close(); } ```