Browse Source

doc: clarify rl.question callback args

Clarify that readline's rl.question() callback does not
use the err back pattern.

Fixes: https://github.com/nodejs/node/issues/4833
PR-URL: https://github.com/nodejs/node/pull/7022
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
v7.x
James M Snell 9 years ago
parent
commit
c300ba2212
  1. 4
      doc/api/readline.md

4
doc/api/readline.md

@ -262,6 +262,10 @@ rl.question('What is your favorite food?', (answer) => {
});
```
*Note*: The `callback` function passed to `rl.question()` does not follow the
typical pattern of accepting an `Error` object or `null` as the first argument.
The `callback` is called with the provided answer as the only argument.git
### rl.resume()
<!-- YAML
added: v0.3.4

Loading…
Cancel
Save