dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Parsing error when casting type without parenthesis
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
I opened https://github.com/swc-project/swc/issues/8244
For parsing errors, I'd recommend trying things out in https://swc.rs/playground