Skip to content

Errors when JSX tags are mixed with type parameters #770

@refparo

Description

@refparo

Describe the bug

dprint-plugin-typescript version: 0.95.13

Input Code

declare function getType<T>(value: T): string;

const jsx = <Tag>{(<T>(value: T) => getType(value))(value)}</Tag>;

Expected Output

declare function getType<T>(value: T): string;

const jsx = <Tag>{(<T>(value: T) => getType(value))(value)}</Tag>;

Actual Output

Unexpected token `Tag`. Expected jsx identifier at file:///file.tsx:3:14

  const jsx = <Tag>{(<T>(value: T) => getType(value))(value)}</Tag>;
               ~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions