proposal-async-init icon indicating copy to clipboard operation
proposal-async-init copied to clipboard

Results 8 proposal-async-init issues
Sort by recently updated
recently updated
newest added
trafficstars

``` class Query { constructor(data) { this.data = data; } async then () { this.somenewdata = await someAsyncFunc(); return this; } } ``` This way `await new Query({data: 'helloworld'})` keeps...

Experimenting with async init now: ``` js class PromiseClass { static #New = async function(){ this.promise='promise'; return this;} constructor(...args) { return PromiseClass.#New.call(this,...args); }//new }//class class AsyncClass extends PromiseClass{ static #New=...

I just wanted to create a reference to a related discussion we are having in Intl which may benefit from this proposal. https://github.com/tc39/ecma402/issues/434

Bluntly, I dislike this whole idea quite intensely. My reason is as follows: New features should _reduce_ the chances of bugs. I think this feature _increases_ the surface area for...

I did some preliminary digging, but could not find any prior art in other languages for async constructors. Obviously, tons of prior art exists for factory functions / private constructors,...

I believe the goal of this proposal is to be able to write code that looks something like this: ```javascript async class Base { constructor(fetcher) { this.data = await fetcher.getData();...

Probably, `super await()` will work? This looks like existing `for await` syntax and, if I understand correctly, is not a valid syntax currently. Also, despite the fact that `await super()`...

Great to see this proposal. I tried to discuss the same ideas before, but go with syntax problems... I have no feedback for my last idea, maybe can hear here...