summaryrefslogtreecommitdiff
path: root/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/index.js b/lib/index.js
index 39657d5..0fbeefc 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -13,12 +13,15 @@
* This type of function is also referred to as a "Node-style async function".
*
* Wherever we accept a Node-style async function, we also directly accept an
- * ES2017 `async` function.
- * In this case, the `async` function will not be passed a callback, and any
- * thrown error will be used as the `err` argument of a theoretical callback,
- * and the return value will be used as the `result` value.
+ * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
+ * In this case, the `async` function will not be passed a final callback
+ * argument, and any thrown error will be used as the `err` argument of the
+ * implicit callback, and the return value will be used as the `result` value.
+ * (i.e. a `rejected` of the returned Promise becomes the `err` callback
+ * argument, and a `resolved` value becomes the `result`.)
*
- * Note that we can only detect native `async function`s in this case.
+ * Note, due to JavaScript limitations, we can only detect native `async`
+ * functions and not transpilied implementations.
* Your environment must have `async`/`await` support for this to work.
* (e.g. Node > v7.6, or a recent version of a modern browser).
* If you are using `async` functions through a transpiler (e.g. Babel), you