Skip to content

Formatter fails to format files that contain >> from templated type definitions #960

@Alexander-L-Robert

Description

@Alexander-L-Robert

For something like

export type a<T> = T
export type b<T> = T
export type c = any

When formatting the line below:
export type myType = a<b<c> >
It gets formatted to this:
export type myType = a<b<c>>

Then whenever I try to format the file again I get an error:
[error] error: could not format from stdin: failed to format from stdin: error parsing:

  • unexpected token >> (4:27 to 4:29), expected '>' to close generic type parameter list
  • unexpected token >> (4:27 to 4:29), unexpected token, this needs to be a statement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions