Skip to content

Transpiling async/await to promises instead of generators for es5 #11725

Closed
@sheerun

Description

@sheerun

According to #1564 async/await support in ES5 typescript depends on generators in ES5 to be implemented. But ES5 generators implementation has been declined.

I hope it won't mean that async/await support won't be unsupported as well, because async/await depending on generators is a false assumption, as demonstrated by fast-async. Instead of compiling async/await to generators as intermediate step, you can go straight to Promises. It results in ES5 target support and better looking code.

Could you consider implementing async/await support for ES5 target without focusing so much on generators? Most of the community finds async/await support more important.

Ping @RyanCavanaugh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions