Skip to content

Remove braces refactoring produces broken code if returning an object literal with type casting #43313

@pushkine

Description

@pushkine

TS 4.2.3 and 4.3.0-dev.20210318

const a = () => {
    return {} as {}
}

Code_2021-03-19_19-15-55

Code_2021-03-19_19-16-07

Metadata

Metadata

Assignees

No one assigned

    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