Skip to content

conversion to async function buggy with named exported functions #27429

Closed
@targos

Description

@targos

TypeScript Version: 3.1.1

Search Terms: async export convert

Code

export function testAsync() {
  return apiFetchJSON('url').then((data) => {
    if (!data.error) {
      return data;
    } else {
      return null;
    }
  });
}

Expected behavior:

Converted to export async function testAsync() { ... }

Actual behavior:

Converted to async export function testAsync() { ... }

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbol

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions