From be9da500c78ec4946b9ef58dc2e384e048218b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rory=20O=E2=80=99Kane?= Date: Tue, 26 May 2020 21:25:33 -0400 Subject: [PATCH] =?UTF-8?q?docs(api):=20explain=20`.parse()`=E2=80=99s=20e?= =?UTF-8?q?xiting=20behavior=20more=20clearly=20(#1647)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 5e2224cd4..def8e6a37 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1205,7 +1205,9 @@ parser.parse(bot.userText, function (err, argv, output) { }) ``` -***Note:*** Providing a callback to `parse()` disables the [`exitProcess` setting](#exitprocess) until after the callback is invoked. +***Note:*** Providing a callback to `parse()` prevents Yargs from exiting +automatically while there is still work in the event loop, as if the +[`exitProcess` setting](#exitprocess) were set to `false`. ***Note:*** the `output` parameter of a `parse()` callback only contains text output by yargs using its internal logger. It *does not* include any text output by user-supplied callback, such as `console.log()` outputs in a