Skip to content

Commit

Permalink
doc: clarify rl.question callback args
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jasnell committed Jun 7, 2016
1 parent ed8b600 commit c300ba2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c300ba2

Please sign in to comment.