Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Unify Await with variant used in AsyncGeneratorResumeNext #110

Open
schuay opened this issue Jul 27, 2017 · 1 comment
Open

Unify Await with variant used in AsyncGeneratorResumeNext #110

schuay opened this issue Jul 27, 2017 · 1 comment

Comments

@schuay
Copy link

schuay commented Jul 27, 2017

AsyncGeneratorResumeNext [0] uses a minor variant of Await [1] with different onFulfilled and onReject closures, but that is not clear just by looking at steps 10.b.i.2-9 (at least not to me).

WDYT about either extracting these steps into a new named AsyncGeneratorAwait function (or similar), or refactoring Await to take onFulfilled and onRejected as arguments?

[0] https://tc39.github.io/proposal-async-iteration/#sec-asyncgeneratorresumenext
[1] https://tc39.github.io/proposal-async-iteration/#await

@domenic
Copy link
Member

domenic commented Aug 1, 2017

I guess we could, but I'd kind of rather wait for tc39/ecma262#933 to clean this up entirely. But I'd be happy to take a pull request refactoring it in the meantime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants