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

Parsing error when casting type without parenthesis #576

Open
cedric-spinergie opened this issue Nov 7, 2023 · 1 comment
Open

Parsing error when casting type without parenthesis #576

cedric-spinergie opened this issue Nov 7, 2023 · 1 comment
Labels
bug Something isn't working upstream

Comments

@cedric-spinergie
Copy link

Describe the bug
A parsing error occurs for valid TypeScript code.

dprint-plugin-typescript version: 0.88.3

Input Code

availableZoom as any <= zoom

Expected Output

(availableZoom as any) <= zoom

Actual Output

Expression expected at file.ts:1:23

  availableZoom as any <= zoom
                        ~

Playground link
Playground link

@dsherret dsherret added bug Something isn't working upstream labels Nov 7, 2023
@dsherret
Copy link
Member

dsherret commented Nov 7, 2023

I opened swc-project/swc#8244

For parsing errors, I'd recommend trying things out in https://swc.rs/playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants