Skip to content

Add ability to target es5 and still use generators for async/await #12557

Closed
@born2net

Description

@born2net

I am targeting es5 in my tsconfig and so when I transpile with tsc I get the long (non generators) version of async / await. So I figured if I added to my tsconfig the following:

 "lib": [
    "dom",
    "es5",
    "es2015.promise",
    "es2015.generator",
    "es2015.core",
    "es2015.collection",
    "es2015.iterable",
    "es2015.promise",
    "es2015.proxy",
    "es2015.reflect",
    "es2015.generator",
    "es2015.symbol",
    "es2015.symbol.wellknown"

so I hoped TS will see that my browser supports generators and thus will take advantage of them, but still I get the longer format of async / await...

is this a bug? missing feature?

regards,

Sean

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