Firefox Tomorrow

javascript class

AsyncFunction

View on MDN ↗

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.

Constructor

Instance properties

Also inherits instance properties from its parent Function.

These properties are defined on AsyncFunction.prototype and shared by all AsyncFunction instances.

[!NOTE] AsyncFunction instances do not have the prototype property.

Instance methods

Inherits instance methods from its parent Function.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also