From ea3355b161bc988d32823749ee774e2bddf38b06 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 10 Jul 2020 23:57:58 -0700 Subject: [PATCH] doc: improve text in fs docs about omitting callbacks Repair misplaced colon and condense text. PR-URL: https://github.com/nodejs/node/pull/34307 Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- doc/api/fs.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index d9d36b6e1024ea..da51978a886b10 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -79,13 +79,10 @@ In busy processes, use the asynchronous versions of these calls. The synchronous versions will block the entire process until they complete, halting all connections. -While it is not recommended, most fs functions allow the callback argument to -be omitted, in which case a default callback is used that rethrows errors. To -get a trace to the original call site, set the `NODE_DEBUG` environment -variable: - -Omitting the callback function on asynchronous fs functions is deprecated and -may result in an error being thrown in the future. +Most asynchronous `fs` functions allow the callback argument to be omitted. +However, this usage is deprecated. When the callback is omitted, a default +callback is used that rethrows errors. To get a trace to the original call site, +set the `NODE_DEBUG` environment variable: ```console $ cat script.js