Skip to content

What about async generators?  #7

@njlr

Description

@njlr

We should support async generators somehow.

const f = async function * () {
  await somethingAsync();
  yield 1;
  await anotherThingAsync();
  yield 2;
}

// Iteration requires the await keyword
async () => {
  for await (const x of f()) {
    console.log(x);
  }
};
  • Will we need to add any run-time dependencies?
  • Do the functions belong here or in another library?
  • Should we do dynamic dispatch on the existing functions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions