Skip to content

Parsing error when casting type without parenthesis #576

Open
@cedric-spinergie

Description

@cedric-spinergie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions