Skip to content

Commit

Permalink
docs(api): explain .parse()’s exiting behavior more clearly (yargs#…
Browse files Browse the repository at this point in the history
  • Loading branch information
roryokane committed May 27, 2020
1 parent 77fcc2b commit be9da50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/api.md
Expand Up @@ -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
Expand Down

0 comments on commit be9da50

Please sign in to comment.