Skip to content
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

Syntax: Parens required around type expressions but dropped by formatter #6319

Closed
glennsl opened this issue Jul 6, 2023 · 0 comments · Fixed by #6324
Closed

Syntax: Parens required around type expressions but dropped by formatter #6319

glennsl opened this issue Jul 6, 2023 · 0 comments · Fixed by #6324

Comments

@glennsl
Copy link
Contributor

glennsl commented Jul 6, 2023

let x = `${("foo": string)}`

will be formatted as

let x = `${"foo": string}`

which fails to compile with the error:

Expressions with type constraints need to be wrapped in parens:
  ("foo": string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant