Async Class

Dimitrian Nine dimtimeforever at
Mon Feb 19 07:49:07 UTC 2018

 "I think awaitNew MyObject() would fit the thrust of your idea more"

For me more good my first version... async class = return Promise(obj)
But i can agree with others decisions, if in the end i get: easy way to
async new

Some people ask me for some more interesting sample...
Maybe it can help - try create:
//some module
async class FilterImg{
this.img = await load(path);
if (filters) {await this.use_filters(filters);}
async use_filters(filters){
await filter1(this.image);
await filter2(this.image);
export default FilterImg;
//end module

void async finction(){
let FilterImg = (await import(url)).default;
async class ExtFilterImg extends FilterImg{
await super(path);
if (filters) {await this.use_extFilters(filters);}

let extFilter_img = await new FilterImg(path,filters);
console.log(extFilter_img.src+' '+extFilter_img.filters);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list