On Sun, Feb 18, 2018 at 8:27 AM, Naveen Chawla <naveen.c...@gmail.com>
wrote:
>
> Like this:
>
> ```js
> class MyObject{
>     constructor(){
>         initializeAsync();
>     }
>
>     async initializeAsync(){
>         await doSomething();
>         await doSomethingElse();
>         //etc.
>     }
> }
> ```

That constructor breaks one of the main rules of promises: Either handle
the rejection, or propagate the promise.

-- T.J. Crowder
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to