Skip to content

Commit d31f728

Browse 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 <[email protected]>
1 parent 70f2f35 commit d31f728

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/readline.md

+4
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)