Async Class

Claude Pache claude.pache at
Tue Aug 27 16:36:46 UTC 2019

> Le 26 août 2019 à 17:11, Dimitrian Nine <dimtimeforever at> a écrit :
> Class is just function constructor that return object

Although in JS a class is represented by the same object as its constructor, I don’t think it is good to assimilate the concept of JS class and JS constructor. Indeed, a class consists not only of its constructor, but also of all its associated methods. This is what is suggested by the syntax:

class C { 
    /* definition of all methods, not only constructor */ 

From that perspective, I understand very well what would be an “async constructor”; but an “async class” doesn’t make much sense.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list