From 405b50cdbabb51997933a06dad150704ab009d86 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 d8456dbdb3a1f7..832389ce05c6dd 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(); } ```