Skip to content

Quick fix at await to make current function async #21034

Closed
@jwbay

Description

@jwbay

TypeScript Version: 2.7.0-dev.201xxxxx

Code

function foo() {
  await/*1*/ bar();
}

Expected behavior:
At 1, offers a code action that converts the innermost function to async:

async function foo() {
  await bar();
}

Actual behavior:
Error at 1 with no quick fix offered

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Quick FixesEditor-provided fixes, often called code actions.FixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions