Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ba7ba4f

Browse filesBrowse files
Trottaddaleax
authored andcommitted
doc: improve text in fs docs about omitting callbacks
Repair misplaced colon and condense text. PR-URL: #34307 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent c4f0cb6 commit ba7ba4f
Copy full SHA for ba7ba4f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+4-7Lines changed: 4 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,10 @@ In busy processes, use the asynchronous versions of these calls. The synchronous
7979
versions will block the entire process until they complete, halting all
8080
connections.
8181

82-
While it is not recommended, most fs functions allow the callback argument to
83-
be omitted, in which case a default callback is used that rethrows errors. To
84-
get a trace to the original call site, set the `NODE_DEBUG` environment
85-
variable:
86-
87-
Omitting the callback function on asynchronous fs functions is deprecated and
88-
may result in an error being thrown in the future.
82+
Most asynchronous `fs` functions allow the callback argument to be omitted.
83+
However, this usage is deprecated. When the callback is omitted, a default
84+
callback is used that rethrows errors. To get a trace to the original call site,
85+
set the `NODE_DEBUG` environment variable:
8986

9087
```console
9188
$ cat script.js

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.