The AsyncFunction()
constructor creates AsyncFunction
objects.
Note that AsyncFunction
is not a global object. It can be obtained with the following code:
const AsyncFunction = async function () {}.constructor;
The AsyncFunction()
constructor is not intended to be used directly, and all caveats mentioned in the Function()
description apply to AsyncFunction()
.