From d31f728e093f1186bb8713da34eb381c6129f5d2 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 6 Jun 2016 13:51:52 -0700 Subject: [PATCH] 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 --- doc/api/readline.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/readline.md b/doc/api/readline.md index 9003d4d2eb301d..6ddbd1cdf6af56 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()