Skip to content

Commit

Permalink
Clarify add() return value
Browse files Browse the repository at this point in the history
Fixes #213
  • Loading branch information
sindresorhus committed Oct 29, 2024
1 parent 47a4f19 commit cbdbbb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ If `true`, specifies that any [pending](https://developer.mozilla.org/en-US/docs

#### .add(fn, options?)

Adds a sync or async task to the queue. Always returns a promise.
Adds a sync or async task to the queue.

Returns a promise with the return value of `fn`.

Note: If your items can potentially throw an exception, you must handle those errors from the returned Promise or they may be reported as an unhandled Promise rejection and potentially cause your process to exit immediately.

Expand Down

0 comments on commit cbdbbb7

Please sign in to comment.