Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pushkine opened this issue Mar 19, 2021 · 0 comments · Fixed by #43315
Labels
Bug A bug in TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol
Milestone

Comments

@pushkine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol
Projects
None yet
2 participants