ECMAScript 6 has the GeneratorFunction constructor available through Object.getPrototypeOf(function*(){}).constructor. By configuring GeneratorFunction.prototype.prototype generators created by generator functions can be globally customized.
This proposal should likewise add a AsyncGeneratorFunction constructor, so that, for example, AsyncGeneratorFunction.prototype.prototype could be configured to have the value of the Observable.prototype object given in observable.js in the example.
ECMAScript 6 has the
GeneratorFunctionconstructor available throughObject.getPrototypeOf(function*(){}).constructor. By configuringGeneratorFunction.prototype.prototypegenerators created by generator functions can be globally customized.This proposal should likewise add a
AsyncGeneratorFunctionconstructor, so that, for example,AsyncGeneratorFunction.prototype.prototypecould be configured to have the value of theObservable.prototypeobject given inobservable.jsin the example.