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 d31f728

Browse filesBrowse files
jasnellevanlucas
authored andcommitted
doc: clarify rl.question callback args
Clarify that readline's rl.question() callback does not use the err back pattern. Fixes: #4833 PR-URL: #7022 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 70f2f35 commit d31f728
Copy full SHA for d31f728

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/readline.md‎

Copy file name to clipboardExpand all lines: doc/api/readline.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ rl.question('What is your favorite food?', (answer) => {
262262
});
263263
```
264264

265+
*Note*: The `callback` function passed to `rl.question()` does not follow the
266+
typical pattern of accepting an `Error` object or `null` as the first argument.
267+
The `callback` is called with the provided answer as the only argument.git
268+
265269
### rl.resume()
266270
<!-- YAML
267271
added: v0.3.4

0 commit comments

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