Async Class
Isiah Meadows
isiahmeadows at gmail.com
Fri Feb 16 07:16:19 UTC 2018
Is an async factory function/method not sufficient to do this? Also,
note that you *can* return promises out of the constructor (and I've
done it before).
-----
Isiah Meadows
me at isiahmeadows.com
Looking for web consulting? Or a new website?
Send me an email and we can get started.
www.isiahmeadows.com
On Thu, Feb 15, 2018 at 11:12 PM, Dimitrian Nine
<dimtimeforever at gmail.com> wrote:
> I cant find: was or not that proposal...
>
> But can we have Async Class with async constructor and async super?
>
> //AsyncClass
> async_class AsyncClass { // keyword async_class(example)
> constructor() {
> await something(); //now constructor async too
> }}
>
> //AsyncObj in some async method
> let NewAsyncObj = await AsyncClass(); // create async obj
>
> //Extends
> async_class ExtAsyncClass extends AsyncClass{
> constructor() {
> await super(); // now we can await super too
> await something();
> }}
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
More information about the es-discuss
mailing list