Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

AsyncFunction

BaselineWidely available

TheAsyncFunction object provides methods forasync functions. In JavaScript, every async function is actually anAsyncFunction object.

Note thatAsyncFunction isnot a global object. It can be obtained with the following code:

js
const AsyncFunction = async function () {}.constructor;

AsyncFunction is a subclass ofFunction.

Constructor

AsyncFunction()

Creates a newAsyncFunction object.

Instance properties

Also inherits instance properties from its parentFunction.

These properties are defined onAsyncFunction.prototype and shared by allAsyncFunction instances.

AsyncFunction.prototype.constructor

The constructor function that created the instance object. ForAsyncFunction instances, the initial value is theAsyncFunction constructor.

AsyncFunction.prototype[Symbol.toStringTag]

The initial value of the[Symbol.toStringTag] property is the string"AsyncFunction". This property is used inObject.prototype.toString().

Note:AsyncFunction instances do not have theprototype property.

Instance methods

Inherits instance methods from its parentFunction.

Specifications

Specification
ECMAScript® 2026 Language Specification
# sec-async-function-objects

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp