Skip to content

conversion to async function buggy with named exported functions #27429

Closed

Description

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() { ... }

Activity

  1. ghost closed this as completedin #27491on Oct 2, 2018
  2. DanielRosenwasser commented on Oct 9, 2018

    @DanielRosenwasser
    Member

    Ben Lichtman (@uniqueiniquity) can you port this over to release-3.1?

  3. DanielRosenwasser commented on Oct 11, 2018

    @DanielRosenwasser
    Member

    3.1 fix is in 7c6a14e

  4. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: LS: 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