Skip to content

Offer quick fix for some uses of 'await' outside an async context #46986

Closed
@rbuckton

Description

@rbuckton

Originally discussed in #38483.

We currently offer a quick fix to add an async modifier if we parse await in a non-async context when the await is unambiguously an AwaitExpression:

image

However, we do not offer that quick fix if we parse await in cases where it is ambiguous (such as in a call expression):

image

We should consider special-casing the error message for await when it is ambiguous so that we can offer compatible quick fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions