The AsyncGeneratorFunction object provides methods for async generator functions. In JavaScript, every async generator function is actually an AsyncGeneratorFunction object.

Note that AsyncGeneratorFunction is not a global object. It can be obtained with the following code:

const AsyncGeneratorFunction = async function* () {}.constructor;



Creates a new AsyncGeneratorFunction object.

Instance properties

Also inherits instance properties from its parent Function.


The initial value of the @@toStringTag property is the string "AsyncGeneratorFunction". This property is used in Object.prototype.toString().


All async generator functions share the same prototype property, which is AsyncGenerator.prototype. When the function is called, this object becomes the prototype of the returned async generator object. An async generator function instance can also create its own prototype property, which will be used instead of AsyncGeneratorFunction.prototype.prototype.

Instance methods

Inherits instance methods from its parent Function.


ECMAScript Language Specification
# sec-asyncgeneratorfunction-objects

Browser compatibility

BCD tables only load in the browser

See also