The AsyncFunction
object provides methods for async functions. In JavaScript, every async function is actually an AsyncFunction
object.
Note that AsyncFunction
is not a global object. It can be obtained with the following code:
const AsyncFunction = async function () {}.constructor;
AsyncFunction
is a subclass of Function
.