aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2016-06-06 13:51:52 -0700
committerJames M Snell <jasnell@gmail.com>2016-06-07 07:15:14 -0700
commitc300ba22128ce8e675650adcd1f6b869dc1b5126 (patch)
treeee4a0002b9165f6698531f2260f29661c55dc390 /doc
parented8b600b98e434dbe6d966df371dfde08016222f (diff)
downloadandroid-node-v8-c300ba22128ce8e675650adcd1f6b869dc1b5126.tar.gz
android-node-v8-c300ba22128ce8e675650adcd1f6b869dc1b5126.tar.bz2
android-node-v8-c300ba22128ce8e675650adcd1f6b869dc1b5126.zip
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/readline.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md
index 9003d4d2eb..6ddbd1cdf6 100644
--- a/doc/api/readline.md
+++ b/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